add_custom_command(
OUTPUT ${JAVADOC_INDEX_FILE}
COMMAND
- ${Java_JAVADOC_EXECUTABLE} io.github.cvc5.api
+ ${Java_JAVADOC_EXECUTABLE} io.github.cvc5
-sourcepath ${CMAKE_SOURCE_DIR}/src/api/java/:${CMAKE_BINARY_DIR}/src/api/java/
-d ${JAVADOC_OUTPUT_DIR}
-cp ${CVC5_JAR_FILE}
* SimpleVC
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class SimpleVC
{
*
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.*;
public class BitVectors
*
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.*;
public class BitVectorsAndArrays
* The model is displayed using getValue().
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.Iterator;
public class Combination
* An example of using inductive datatypes in cvc5.
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.Iterator;
public class Datatypes
* A simple demonstration of catching cvc5 execptions via the Java API.
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Exceptions
{
*
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Extract
{
* an IEEE 754-2008 bit-vector to a floating-point number.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class FloatingPointArith
{
* A very simple CVC5 tutorial example.
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class HelloWorld
{
* the push pop of cvc5. This also gives an example option.
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class LinearArith
{
public static void main(String args[]) throws CVC5ApiException
*
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
* A simple demonstration of reasoning about relations with cvc5 via Java API.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Relations
{
* A simple demonstration of reasoning about sequences with cvc5 via C++ API.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Sequences
{
* A simple demonstration of reasoning about sets with cvc5.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Sets
{
* An example of accessing cvc5's statistics using the Java API.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.List;
import java.util.Map;
{
// Get the statistics from the `Solver` and iterate over them. The
// `Statistics` class implements the `Iterable<Pair<String, Stat>>` interface.
- io.github.cvc5.api.Statistics stats = solver.getStatistics();
+ io.github.cvc5.Statistics stats = solver.getStatistics();
// short version
System.out.println("Short version:");
System.out.println(stats);
* A simple demonstration of reasoning about strings with cvc5 via C++ API.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Strings
{
* functions. This is a direct translation of sygus-fun.cpp.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class SygusFun
{
* of sygus-grammar.cpp.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class SygusGrammar
{
* invariant. This is a direct translation of sygus-inv.cpp.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class SygusInv
{
* A simple demonstration of the transcendental extension.
*/
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
public class Transcendentals
{
* An example of interacting with unsat cores using cvc5's Java API.
*/
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.Arrays;
public class UnsatCores
import java.util.ArrayList;
import java.util.List;
-import io.github.cvc5.api.CVC5ApiException;
-import io.github.cvc5.api.Kind;
-import io.github.cvc5.api.Sort;
-import io.github.cvc5.api.Term;
+import io.github.cvc5.CVC5ApiException;
+import io.github.cvc5.Kind;
+import io.github.cvc5.Sort;
+import io.github.cvc5.Term;
public class Utils
{
# Generate Kind.java
set(JAVA_KIND_FILE
- "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/api/Kind.java"
+ "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/Kind.java"
)
add_custom_command(
OUTPUT
"${PYTHON_EXECUTABLE}"
"${CMAKE_CURRENT_BINARY_DIR}/genenums.py"
--enums-header "${PROJECT_SOURCE_DIR}/src/api/cpp/cvc5_kind.h"
- --java-api-path "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/"
+ --java-api-path "${CMAKE_CURRENT_BINARY_DIR}/io/github/"
DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/genenums.py"
"${PROJECT_SOURCE_DIR}/src/api/parseenums.py"
add_custom_target(generate-java-kinds DEPENDS ${JAVA_KIND_FILE})
set(JAVA_TYPES_FILES
- "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/api/BlockModelsMode.java"
- "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/api/RoundingMode.java"
- "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/api/UnknownExplanation.java"
+ "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/BlockModelsMode.java"
+ "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/RoundingMode.java"
+ "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/UnknownExplanation.java"
)
add_custom_command(
OUTPUT
"${PYTHON_EXECUTABLE}"
"${CMAKE_CURRENT_BINARY_DIR}/genenums.py"
--enums-header "${PROJECT_SOURCE_DIR}/src/api/cpp/cvc5_types.h"
- --java-api-path "${CMAKE_CURRENT_BINARY_DIR}/io/github/cvc5/"
+ --java-api-path "${CMAKE_CURRENT_BINARY_DIR}/io/github/"
DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/genenums.py"
"${PROJECT_SOURCE_DIR}/src/api/parseenums.py"
# specify java source files
set(JAVA_FILES
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/AbstractPointer.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/CVC5ApiException.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/CVC5ApiOptionException.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/CVC5ApiRecoverableException.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Datatype.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/DatatypeConstructor.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/DatatypeConstructorDecl.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/DatatypeDecl.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/DatatypeSelector.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Grammar.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/IPointer.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Op.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/OptionInfo.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Pair.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Result.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Solver.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Sort.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Stat.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Statistics.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/SynthResult.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Term.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Triplet.java
- ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/api/Utils.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/AbstractPointer.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/CVC5ApiException.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/CVC5ApiOptionException.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/CVC5ApiRecoverableException.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Datatype.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/DatatypeConstructor.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/DatatypeConstructorDecl.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/DatatypeDecl.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/DatatypeSelector.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Grammar.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/IPointer.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Op.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/OptionInfo.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Pair.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Result.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Solver.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Sort.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Stat.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Statistics.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/SynthResult.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Term.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Triplet.java
+ ${CMAKE_CURRENT_LIST_DIR}/io/github/cvc5/Utils.java
${JAVA_KIND_FILE}
)
# specify generated jni headers
set(JNI_HEADERS
- ${JNI_DIR}/io_github_cvc5_api_Solver.h
+ ${JNI_DIR}/io_github_cvc5_DatatypeConstructorDecl.h
+ ${JNI_DIR}/io_github_cvc5_DatatypeConstructor.h
+ ${JNI_DIR}/io_github_cvc5_DatatypeDecl.h
+ ${JNI_DIR}/io_github_cvc5_Datatype.h
+ ${JNI_DIR}/io_github_cvc5_DatatypeSelector.h
+ ${JNI_DIR}/io_github_cvc5_Grammar.h
+ ${JNI_DIR}/io_github_cvc5_Op.h
+ ${JNI_DIR}/io_github_cvc5_OptionInfo.h
+ ${JNI_DIR}/io_github_cvc5_Result.h
+ ${JNI_DIR}/io_github_cvc5_Solver.h
+ ${JNI_DIR}/io_github_cvc5_Sort.h
+ ${JNI_DIR}/io_github_cvc5_Stat.h
+ ${JNI_DIR}/io_github_cvc5_Statistics.h
+ ${JNI_DIR}/io_github_cvc5_SynthResult.h
+ ${JNI_DIR}/io_github_cvc5_Term.h
)
# generate jni headers
# Code Blocks
ENUM_JAVA_TOP = \
- r"""package io.github.cvc5.{namespace};
+ r"""package io.github.{namespace};
import java.util.HashMap;
import java.util.Map;
def gen_java(parser: EnumParser, path):
for namespace in parser.namespaces:
for enum in namespace.enums:
- subnamespace = namespace.name.split('::')[-1]
- # Workaround to make it work without moving the java files. Will be
- # done in a subsequent PR by Andres
- if subnamespace == 'cvc5':
- subnamespace = 'api'
+ subnamespace = namespace.name.replace('::', '.')
filedir = os.path.join(path, subnamespace)
if not os.path.exists(filedir):
os.mkdir(filedir)
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+abstract class AbstractPointer implements IPointer
+{
+ protected final Solver solver;
+ protected long pointer;
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ protected abstract void deletePointer(long pointer);
+
+ void deletePointer()
+ {
+ if (pointer != 0)
+ {
+ deletePointer(pointer);
+ }
+ pointer = 0;
+ }
+
+ public Solver getSolver()
+ {
+ return solver;
+ }
+
+ @Override
+ public String toString()
+ {
+ return toString(pointer);
+ }
+
+ abstract protected String toString(long pointer);
+
+ AbstractPointer(Solver solver, long pointer)
+ {
+ this.solver = solver;
+ this.pointer = pointer;
+ solver.addAbstractPointer(this);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class CVC5ApiException extends Exception
+{
+ public CVC5ApiException(String message)
+ {
+ super(message);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Gereon Kremer, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class CVC5ApiOptionException extends CVC5ApiRecoverableException
+{
+ public CVC5ApiOptionException(String message)
+ {
+ super(message);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class CVC5ApiRecoverableException extends CVC5ApiException
+{
+ public CVC5ApiRecoverableException(String message)
+ {
+ super(message);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+public class Datatype extends AbstractPointer implements Iterable<DatatypeConstructor>
+{
+ // region construction and destruction
+ Datatype(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Get the datatype constructor at a given index.
+ * @param idx the index of the datatype constructor to return
+ * @return the datatype constructor with the given index
+ */
+ public DatatypeConstructor getConstructor(int idx)
+ {
+ long constructorPointer = getConstructor(pointer, idx);
+ return new DatatypeConstructor(solver, constructorPointer);
+ }
+
+ private native long getConstructor(long pointer, int index);
+
+ /**
+ * Get the datatype constructor with the given name.
+ * This is a linear search through the constructors, so in case of multiple,
+ * similarly-named constructors, the first is returned.
+ * @param name the name of the datatype constructor
+ * @return the datatype constructor with the given name
+ */
+ public DatatypeConstructor getConstructor(String name)
+ {
+ long constructorPointer = getConstructor(pointer, name);
+ return new DatatypeConstructor(solver, constructorPointer);
+ }
+
+ private native long getConstructor(long pointer, String name);
+
+ /**
+ * Get a term representing the datatype constructor with the given name.
+ * This is a linear search through the constructors, so in case of multiple,
+ * similarly-named constructors, the
+ * first is returned.
+ * @param name the name of the datatype constructor
+ * @return a Term representing the datatype constructor with the given name
+ */
+ public Term getConstructorTerm(String name)
+ {
+ long termPointer = getConstructorTerm(pointer, name);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getConstructorTerm(long pointer, String name);
+
+ /**
+ * Get the datatype constructor with the given name.
+ * This is a linear search through the constructors and their selectors, so
+ * in case of multiple, similarly-named selectors, the first is returned.
+ * @param name the name of the datatype selector
+ * @return the datatype selector with the given name
+ */
+ public DatatypeSelector getSelector(String name)
+ {
+ long selectorPointer = getSelector(pointer, name);
+ return new DatatypeSelector(solver, selectorPointer);
+ }
+
+ private native long getSelector(long pointer, String name);
+
+ /** @return the name of this Datatype. */
+ public String getName()
+ {
+ return getName(pointer);
+ }
+
+ private native String getName(long pointer);
+
+ /** @return the number of constructors for this Datatype. */
+ public int getNumConstructors()
+ {
+ return getNumConstructors(pointer);
+ }
+
+ private native int getNumConstructors(long pointer);
+
+ /**
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return the parameters of this datatype, if it is parametric. An exception
+ * is thrown if this datatype is not parametric.
+ */
+ public Sort[] getParameters()
+ {
+ long[] sortPointers = getParameters(pointer);
+ Sort[] sorts = Utils.getSorts(solver, sortPointers);
+ return sorts;
+ }
+
+ private native long[] getParameters(long pointer);
+
+ /**
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return true if this datatype is parametric
+ */
+ public boolean isParametric()
+ {
+ return isParametric(pointer);
+ }
+
+ private native boolean isParametric(long pointer);
+
+ /** @return true if this datatype corresponds to a co-datatype */
+ public boolean isCodatatype()
+ {
+ return isCodatatype(pointer);
+ }
+
+ private native boolean isCodatatype(long pointer);
+
+ /** @return true if this datatype corresponds to a tuple */
+ public boolean isTuple()
+ {
+ return isTuple(pointer);
+ }
+
+ private native boolean isTuple(long pointer);
+
+ /**
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return true if this datatype corresponds to a record
+ */
+ public boolean isRecord()
+ {
+ return isRecord(pointer);
+ }
+
+ private native boolean isRecord(long pointer);
+
+ /** @return true if this datatype is finite */
+ public boolean isFinite()
+ {
+ return isFinite(pointer);
+ }
+
+ private native boolean isFinite(long pointer);
+
+ /**
+ * Is this datatype well-founded? If this datatype is not a codatatype,
+ * this returns false if there are no values of this datatype that are of
+ * finite size.
+ *
+ * @return true if this datatype is well-founded
+ */
+ public boolean isWellFounded()
+ {
+ return isWellFounded(pointer);
+ }
+
+ private native boolean isWellFounded(long pointer);
+
+ /**
+ * @return true if this Datatype is a null object
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return a string representation of this datatype
+ */
+ protected native String toString(long pointer);
+
+ public class ConstIterator implements Iterator<DatatypeConstructor>
+ {
+ private int currentIndex;
+ private int size;
+
+ public ConstIterator()
+ {
+ currentIndex = -1;
+ size = getNumConstructors();
+ }
+
+ @Override
+ public boolean hasNext()
+ {
+ return currentIndex < size - 1;
+ }
+
+ @Override
+ public DatatypeConstructor next()
+ {
+ if (currentIndex >= size - 1)
+ {
+ throw new NoSuchElementException();
+ }
+ currentIndex++;
+
+ return getConstructor(currentIndex);
+ }
+ }
+
+ @Override
+ public Iterator<DatatypeConstructor> iterator()
+ {
+ return new ConstIterator();
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+public class DatatypeConstructor extends AbstractPointer implements Iterable<DatatypeSelector>
+{
+ // region construction and destruction
+ DatatypeConstructor(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /** @return the name of this Datatype constructor. */
+ public String getName()
+ {
+ return getName(pointer);
+ }
+
+ private native String getName(long pointer);
+
+ /**
+ * Get the constructor operator of this datatype constructor.
+ * @return the constructor term
+ */
+ public Term getConstructorTerm()
+ {
+ long termPointer = getConstructorTerm(pointer);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getConstructorTerm(long pointer);
+
+ /**
+ * Get the constructor operator of this datatype constructor whose return
+ * type is retSort. This method is intended to be used on constructors of
+ * parametric datatypes and can be seen as returning the constructor
+ * term that has been explicitly cast to the given sort.
+ *
+ * This method is required for constructors of parametric datatypes whose
+ * return type cannot be determined by type inference. For example, given:
+ * (declare-datatype List (par (T) ((nil) (cons (head T) (tail (List T))))))
+ * The type of nil terms need to be provided by the user. In SMT version 2.6,
+ * this is done via the syntax for qualified identifiers:
+ * (as nil (List Int))
+ * This method is equivalent of applying the above, where this
+ * DatatypeConstructor is the one corresponding to nil, and retSort is
+ * (List Int).
+ *
+ * Furthermore note that the returned constructor term t is an operator,
+ * while Solver::mkTerm(APPLY_CONSTRUCTOR, t) is used to construct the above
+ * (nullary) application of nil.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param retSort the desired return sort of the constructor
+ * @return the constructor term
+ */
+ public Term getInstantiatedConstructorTerm(Sort retSort)
+ {
+ long termPointer = getInstantiatedConstructorTerm(pointer, retSort.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long getInstantiatedConstructorTerm(long pointer, long retSortPointer);
+
+ /**
+ * Get the tester operator of this datatype constructor.
+ * @return the tester operator
+ */
+ public Term getTesterTerm()
+ {
+ long termPointer = getTesterTerm(pointer);
+ return new Term(solver, termPointer);
+ }
+ private native long getTesterTerm(long pointer);
+
+ /**
+ * @return the number of selectors (so far) of this Datatype constructor.
+ */
+ public int getNumSelectors()
+ {
+ return getNumSelectors(pointer);
+ }
+ private native int getNumSelectors(long pointer);
+
+ /**
+ * Get the DatatypeSelector at the given index
+ * @param index the given index i
+ * @return the i^th DatatypeSelector
+ */
+ public DatatypeSelector getSelector(int index)
+ {
+ long selectorPointer = getSelector(pointer, index);
+ return new DatatypeSelector(solver, selectorPointer);
+ }
+ private native long getSelector(long pointer, int index);
+
+ /**
+ * Get the datatype selector with the given name.
+ * This is a linear search through the selectors, so in case of
+ * multiple, similarly-named selectors, the first is returned.
+ * @param name the name of the datatype selector
+ * @return the first datatype selector with the given name
+ */
+ public DatatypeSelector getSelector(String name)
+ {
+ long selectorPointer = getSelector(pointer, name);
+ return new DatatypeSelector(solver, selectorPointer);
+ }
+ private native long getSelector(long pointer, String name);
+
+ /**
+ * Get the term representation of the datatype selector with the given name.
+ * This is a linear search through the arguments, so in case of multiple,
+ * similarly-named arguments, the selector for the first is returned.
+ * @param name the name of the datatype selector
+ * @return a term representing the datatype selector with the given name
+ */
+ public Term getSelectorTerm(String name)
+ {
+ long termPointer = getSelectorTerm(pointer, name);
+ return new Term(solver, termPointer);
+ }
+ private native long getSelectorTerm(long pointer, String name);
+
+ /**
+ * @return true if this DatatypeConstructor is a null object
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return a string representation of this datatype constructor
+ */
+ protected native String toString(long pointer);
+
+ public class ConstIterator implements Iterator<DatatypeSelector>
+ {
+ private int currentIndex;
+ private int size;
+
+ public ConstIterator()
+ {
+ currentIndex = -1;
+ size = getNumSelectors();
+ }
+
+ @Override
+ public boolean hasNext()
+ {
+ return currentIndex < size - 1;
+ }
+
+ @Override
+ public DatatypeSelector next()
+ {
+ if (currentIndex >= size - 1)
+ {
+ throw new NoSuchElementException();
+ }
+ currentIndex++;
+
+ return getSelector(currentIndex);
+ }
+ }
+
+ @Override
+ public Iterator<DatatypeSelector> iterator()
+ {
+ return new ConstIterator();
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class DatatypeConstructorDecl extends AbstractPointer
+{
+ // region construction and destruction
+ DatatypeConstructorDecl(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Add datatype selector declaration.
+ * @param name the name of the datatype selector declaration to add
+ * @param sort the codomain sort of the datatype selector declaration to add
+ */
+ public void addSelector(String name, Sort sort)
+ {
+ addSelector(pointer, name, sort.getPointer());
+ }
+
+ private native void addSelector(long pointer, String name, long sortPointer);
+
+ /**
+ * Add datatype selector declaration whose codomain type is the datatype
+ * itself.
+ * @param name the name of the datatype selector declaration to add
+ */
+ public void addSelectorSelf(String name)
+ {
+ addSelectorSelf(pointer, name);
+ }
+
+ private native void addSelectorSelf(long pointer, String name);
+
+ /**
+ * @return true if this DatatypeConstructorDecl is a null declaration.
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return a string representation of this datatype constructor declaration
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class DatatypeDecl extends AbstractPointer
+{
+ // region construction and destruction
+ DatatypeDecl(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+ /**
+ * Add datatype constructor declaration.
+ * @param ctor the datatype constructor declaration to add
+ */
+ public void addConstructor(DatatypeConstructorDecl ctor)
+ {
+ addConstructor(pointer, ctor.getPointer());
+ }
+
+ private native void addConstructor(long pointer, long declPointer);
+
+ /** Get the number of constructors (so far) for this Datatype declaration. */
+ int getNumConstructors()
+ {
+ return getNumConstructors(pointer);
+ }
+
+ private native int getNumConstructors(long pointer);
+
+ /** @return true if this datatype is parametric */
+ public boolean isParametric()
+ {
+ return isParametric(pointer);
+ }
+
+ private native boolean isParametric(long pointer);
+
+ /**
+ * @return true if this DatatypeDecl is a null object
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return a string representation of this datatype declaration
+ */
+ protected native String toString(long pointer);
+
+ /** @return the name of this datatype declaration. */
+ public String getName()
+ {
+ return getName(pointer);
+ }
+
+ private native String getName(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class DatatypeSelector extends AbstractPointer
+{
+ // region construction and destruction
+ DatatypeSelector(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /** @return the name of this Datatype selector. */
+ public String getName()
+ {
+ return getName(pointer);
+ }
+
+ private native String getName(long pointer);
+
+ /**
+ * Get the selector operator of this datatype selector.
+ * @return the selector term
+ */
+ public Term getSelectorTerm()
+ {
+ long termPointer = getSelectorTerm(pointer);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getSelectorTerm(long pointer);
+
+ /**
+ * Get the upater operator of this datatype selector.
+ * @return the updater term
+ */
+ public Term getUpdaterTerm()
+ {
+ long termPointer = getUpdaterTerm(pointer);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getUpdaterTerm(long pointer);
+
+ /** @return the codomain sort of this selector. */
+ public Sort getCodomainSort()
+ {
+ long sortPointer = getCodomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getCodomainSort(long pointer);
+
+ /**
+ * @return true if this DatatypeSelector is a null object
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return a string representation of this datatype selector
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class Grammar extends AbstractPointer
+{
+ // region construction and destruction
+ Grammar(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ public Grammar(Grammar grammar)
+ {
+ super(grammar.solver, copyGrammar(grammar.pointer));
+ }
+
+ private static native long copyGrammar(long pointer);
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Add \p rule to the set of rules corresponding to \p ntSymbol.
+ * @param ntSymbol the non-terminal to which the rule is added
+ * @param rule the rule to add
+ */
+ public void addRule(Term ntSymbol, Term rule)
+ {
+ addRule(pointer, ntSymbol.getPointer(), rule.getPointer());
+ }
+
+ private native void addRule(long pointer, long ntSymbolPointer, long rulePointer);
+
+ /**
+ * Add \p rules to the set of rules corresponding to \p ntSymbol.
+ * @param ntSymbol the non-terminal to which the rules are added
+ * @param rules the rules to add
+ */
+ public void addRules(Term ntSymbol, Term[] rules)
+ {
+ long[] pointers = Utils.getPointers(rules);
+ addRules(pointer, ntSymbol.getPointer(), pointers);
+ }
+
+ public native void addRules(long pointer, long ntSymbolPointer, long[] rulePointers);
+
+ /**
+ * Allow \p ntSymbol to be an arbitrary constant.
+ * @param ntSymbol the non-terminal allowed to be any constant
+ */
+ public void addAnyConstant(Term ntSymbol)
+ {
+ addAnyConstant(pointer, ntSymbol.getPointer());
+ }
+
+ private native void addAnyConstant(long pointer, long ntSymbolPointer);
+
+ /**
+ * Allow \p ntSymbol to be any input variable to corresponding
+ * synth-fun/synth-inv with the same sort as \p ntSymbol.
+ * @param ntSymbol the non-terminal allowed to be any input constant
+ */
+ public void addAnyVariable(Term ntSymbol)
+ {
+ addAnyVariable(pointer, ntSymbol.getPointer());
+ }
+
+ private native void addAnyVariable(long pointer, long ntSymbolPointer);
+
+ /**
+ * @return a string representation of this grammar.
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+interface IPointer {
+ long getPointer();
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class Op extends AbstractPointer
+{
+ // region construction and destruction
+ Op(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Syntactic equality operator.
+ * Return true if both operators are syntactically identical.
+ * Both operators must belong to the same solver object.
+ * @param t the operator to compare to for equality
+ * @return true if the operators are equal
+ */
+ @Override
+ public boolean equals(Object t)
+ {
+ if (this == t)
+ return true;
+ if (t == null || getClass() != t.getClass())
+ return false;
+ return equals(pointer, ((Op) t).getPointer());
+ }
+
+ private native boolean equals(long pointer1, long pointer2);
+
+ /**
+ * @return the kind of this operator
+ */
+ public Kind getKind()
+ {
+ try
+ {
+ int value = getKind(pointer);
+ return Kind.fromInt(value);
+ }
+ catch (CVC5ApiException e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+ private native int getKind(long pointer);
+
+ /**
+ * @return true if this operator is a null term
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return true iff this operator is indexed
+ */
+ public boolean isIndexed()
+ {
+ return isIndexed(pointer);
+ }
+
+ private native boolean isIndexed(long pointer);
+
+ /**
+ * @return the number of indices of this op
+ */
+ public int getNumIndices()
+ {
+ return getNumIndices(pointer);
+ }
+
+ private native int getNumIndices(long pointer);
+
+ /**
+ * Get the index at position i.
+ * @param i the position of the index to return
+ * @return the index at position i
+ */
+ public Term get(int i) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(i, "index");
+ long termPointer = get(pointer, i);
+ return new Term(solver, termPointer);
+ }
+
+ private native long get(long pointer, int i);
+
+ /**
+ * @return a string representation of this operator
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Gereon Kremer, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.math.BigInteger;
+
+/**
+ * Holds some description about a particular option, including its name, its
+ * aliases, whether the option was explicitly set by the user, and information
+ * concerning its value. The `valueInfo` member holds any of the following
+ * alternatives:
+ * - VoidInfo if the option holds no value (or the value has no native type)
+ * - ValueInfo if the option is of type boolean or String, holds the
+ * current value and the default value.
+ * - NumberInfo if the option is of type BigInteger or double, holds
+ * the current and default value, as well as the minimum and maximum.
+ * - ModeInfo if the option is a mode option, holds the current and default
+ * values, as well as a list of valid modes.
+ * Additionally, this class provides convenience functions to obtain the
+ * current value of an option in a type-safe manner using boolValue(),
+ * stringValue(), intValue(), and doubleValue(). They assert that
+ * the option has the respective type and return the current value.
+ */
+public class OptionInfo extends AbstractPointer
+{
+ // region construction and destruction
+ OptionInfo(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ this.name = getName(pointer);
+ this.aliases = getAliases(pointer);
+ this.setByUser = getSetByUser(pointer);
+ this.baseInfo = getBaseInfo(pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ public String toString()
+ {
+ return toString(pointer);
+ }
+
+ /**
+ * @return a string representation of this optionInfo.
+ */
+ protected native String toString(long pointer);
+
+ // endregion
+
+ /** Abstract class for OptionInfo values */
+ public abstract class BaseInfo
+ {
+ }
+
+ /** Has the current and the default value */
+ public class ValueInfo<T> extends BaseInfo
+ {
+ private final T defaultValue;
+ private final T currentValue;
+ public ValueInfo(T defaultValue, T currentValue)
+ {
+ this.defaultValue = defaultValue;
+ this.currentValue = currentValue;
+ }
+ public T getDefaultValue()
+ {
+ return defaultValue;
+ }
+ public T getCurrentValue()
+ {
+ return currentValue;
+ }
+ }
+
+ public class ModeInfo extends ValueInfo<String>
+ {
+ private final String[] modes;
+
+ public ModeInfo(String defaultValue, String currentValue, String[] modes)
+ {
+ super(defaultValue, currentValue);
+ this.modes = modes;
+ }
+ public String[] getModes()
+ {
+ return modes;
+ }
+ }
+
+ /** Has no value information */
+ public class VoidInfo extends BaseInfo
+ {
+ }
+
+ /** Default value, current value, minimum and maximum of a numeric value */
+ public class NumberInfo<T> extends ValueInfo<T>
+ {
+ private final T minimum;
+ private final T maximum;
+ public NumberInfo(T defaultValue, T currentValue, T minimum, T maximum)
+ {
+ super(defaultValue, currentValue);
+ this.minimum = minimum;
+ this.maximum = maximum;
+ }
+ public T getMinimum()
+ {
+ return minimum;
+ }
+ public T getMaximum()
+ {
+ return maximum;
+ }
+ }
+
+ private native String getName(long pointer);
+
+ private native String[] getAliases(long pointer);
+
+ private native boolean getSetByUser(long pointer);
+
+ private native BaseInfo getBaseInfo(long pointer);
+
+ /** The option name */
+ private final String name;
+ public String getName()
+ {
+ return name;
+ }
+ /** The option name aliases */
+ private final String[] aliases;
+ public String[] getAliases()
+ {
+ return aliases;
+ }
+ /** Whether the option was explicitly set by the user */
+ private final boolean setByUser;
+ public boolean getSetByUser()
+ {
+ return setByUser;
+ }
+
+ /** The option variant information */
+ private final BaseInfo baseInfo;
+ public BaseInfo getBaseInfo()
+ {
+ return baseInfo;
+ }
+
+ /**
+ * Obtain the current value as a boolean. Asserts that valueInfo holds a boolean.
+ */
+ public boolean booleanValue()
+ {
+ return booleanValue(pointer);
+ }
+
+ private native boolean booleanValue(long pointer);
+
+ /**
+ * Obtain the current value as a string. Asserts that valueInfo holds a
+ * string.
+ */
+ public String stringValue()
+ {
+ return stringValue(pointer);
+ }
+
+ private native String stringValue(long pointer);
+
+ /**
+ * Obtain the current value as as int. Asserts that valueInfo holds an int.
+ */
+ public BigInteger intValue()
+ {
+ return intValue(pointer);
+ }
+
+ private native BigInteger intValue(long pointer);
+
+ /**
+ * Obtain the current value as a double. Asserts that valueInfo holds a
+ * double.
+ */
+ public double doubleValue()
+ {
+ return doubleValue(pointer);
+ }
+
+ private native double doubleValue(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class Pair<K, V>
+{
+ public K first;
+ public V second;
+ public Pair(K first, V second)
+ {
+ this.first = first;
+ this.second = second;
+ }
+
+ @Override
+ public boolean equals(Object pair)
+ {
+ if (this == pair)
+ return true;
+ if (pair == null || getClass() != pair.getClass())
+ return false;
+
+ return first.equals(((Pair<?, ?>) pair).first) && second.equals(((Pair<?, ?>) pair).second);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Result extends AbstractPointer
+{
+ // region construction and destruction
+ Result(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * @return true if Result is empty, i.e., a nullary Result, and not an actual
+ * result returned from a checkSat() (and friends) query.
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return true if query was a satisfiable checkSat() or checkSatAssuming()
+ * query.
+ */
+ public boolean isSat()
+ {
+ return isSat(pointer);
+ }
+
+ private native boolean isSat(long pointer);
+
+ /**
+ * @return true if query was an unsatisfiable checkSat() or
+ * checkSatAssuming() query.
+ */
+ public boolean isUnsat()
+ {
+ return isUnsat(pointer);
+ }
+
+ private native boolean isUnsat(long pointer);
+
+ /**
+ * @return true if query was a checkSat() or checkSatAssuming() query and
+ * cvc5 was not able to determine (un)satisfiability.
+ */
+ public boolean isUnknown()
+ {
+ return isUnknown(pointer);
+ }
+
+ private native boolean isUnknown(long pointer);
+
+ /**
+ * Operator overloading for equality of two results.
+ * @param r the result to compare to for equality
+ * @return true if the results are equal
+ */
+ @Override
+ public boolean equals(Object r)
+ {
+ if (this == r)
+ return true;
+ if (r == null || getClass() != r.getClass())
+ return false;
+ Result result = (Result) r;
+ if (this.pointer == result.pointer)
+ {
+ return true;
+ }
+ return equals(pointer, result.getPointer());
+ }
+
+ private native boolean equals(long pointer1, long pointer2);
+
+ /**
+ * @return an explanation for an unknown query result.
+ */
+ public UnknownExplanation getUnknownExplanation()
+ {
+ try
+ {
+ int explanation = getUnknownExplanation(pointer);
+ return UnknownExplanation.fromInt(explanation);
+ }
+ catch (CVC5ApiException e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+ private native int getUnknownExplanation(long pointer);
+
+ /**
+ * @return a string representation of this result.
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.io.IOException;
+import java.util.*;
+
+public class Solver implements IPointer, AutoCloseable
+{
+ private long pointer;
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ private native long newSolver();
+
+ public void deletePointer()
+ {
+ if (pointer != 0)
+ {
+ deletePointer(pointer);
+ }
+ pointer = 0;
+ }
+
+ private static native void deletePointer(long pointer);
+
+ // store pointers for terms, sorts, etc
+ List<AbstractPointer> abstractPointers = new ArrayList<>();
+
+ @Override
+ public void close()
+ {
+ // delete heap memory for terms, sorts, etc
+ for (int i = abstractPointers.size() - 1; i >= 0; i--)
+ {
+ abstractPointers.get(i).deletePointer();
+ }
+ // delete the heap memory for this solver
+ deletePointer();
+ }
+
+ void addAbstractPointer(AbstractPointer abstractPointer)
+ {
+ abstractPointers.add(abstractPointer);
+ }
+
+ static
+ {
+ Utils.loadLibraries();
+ }
+
+ /* .................................................................... */
+ /* Constructors */
+ /* .................................................................... */
+
+ public Solver()
+ {
+ this.pointer = newSolver();
+ }
+
+ /* .................................................................... */
+ /* Sorts Handling */
+ /* .................................................................... */
+
+ /**
+ * @return sort null
+ */
+
+ public Sort getNullSort()
+ {
+ long sortPointer = getNullSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getNullSort(long pointer);
+
+ /**
+ * @return sort Boolean
+ */
+ public Sort getBooleanSort()
+ {
+ long sortPointer = getBooleanSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getBooleanSort(long pointer);
+
+ /**
+ * @return sort Integer (in cvc5, Integer is a subtype of Real)
+ */
+ public Sort getIntegerSort()
+ {
+ long sortPointer = getIntegerSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ public native long getIntegerSort(long pointer);
+ /**
+ * @return sort Real
+ */
+ public Sort getRealSort()
+ {
+ long sortPointer = getRealSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getRealSort(long pointer);
+ /**
+ * @return sort RegExp
+ */
+ public Sort getRegExpSort()
+ {
+ long sortPointer = getRegExpSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getRegExpSort(long pointer);
+ /**
+ * @return sort RoundingMode
+ * @throws CVC5ApiException
+ */
+ public Sort getRoundingModeSort() throws CVC5ApiException
+ {
+ long sortPointer = getRoundingModeSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getRoundingModeSort(long pointer) throws CVC5ApiException;
+ /**
+ * @return sort String
+ */
+ public Sort getStringSort()
+ {
+ long sortPointer = getStringSort(pointer);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long getStringSort(long solverPointer);
+ /**
+ * Create an array sort.
+ * @param indexSort the array index sort
+ * @param elemSort the array element sort
+ * @return the array sort
+ */
+ public Sort mkArraySort(Sort indexSort, Sort elemSort)
+ {
+ long sortPointer = mkArraySort(pointer, indexSort.getPointer(), elemSort.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkArraySort(long pointer, long indexSortPointer, long elementSortPointer);
+
+ /**
+ * Create a bit-vector sort.
+ * @param size the bit-width of the bit-vector sort
+ * @return the bit-vector sort
+ * @throws CVC5ApiException
+ */
+ public Sort mkBitVectorSort(int size) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(size, "size");
+ long sortPointer = mkBitVectorSort(pointer, size);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkBitVectorSort(long pointer, int size);
+
+ /**
+ * Create a floating-point sort.
+ * @param exp the bit-width of the exponent of the floating-point sort.
+ * @param sig the bit-width of the significand of the floating-point sort.
+ * @throws CVC5ApiException
+ */
+ public Sort mkFloatingPointSort(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long sortPointer = mkFloatingPointSort(pointer, exp, sig);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkFloatingPointSort(long solverPointer, int exp, int sig);
+
+ /**
+ * Create a datatype sort.
+ * @param dtypedecl the datatype declaration from which the sort is
+ * created
+ * @return the datatype sort
+ * @throws CVC5ApiException
+ */
+ public Sort mkDatatypeSort(DatatypeDecl dtypedecl) throws CVC5ApiException
+ {
+ long pointer = mkDatatypeSort(this.pointer, dtypedecl.getPointer());
+ return new Sort(this, pointer);
+ }
+
+ private native long mkDatatypeSort(long pointer, long datatypeDeclPointer)
+ throws CVC5ApiException;
+
+ /**
+ * Create a vector of datatype sorts. The names of the datatype
+ * declarations must be distinct.
+ *
+ * @param dtypedecls the datatype declarations from which the sort is
+ * created
+ * @return the datatype sorts
+ * @throws CVC5ApiException
+ */
+ public Sort[] mkDatatypeSorts(List<DatatypeDecl> dtypedecls) throws CVC5ApiException
+ {
+ return mkDatatypeSorts(dtypedecls.toArray(new DatatypeDecl[0]));
+ }
+
+ /**
+ * Create a vector of datatype sorts. The names of the datatype
+ * declarations must be distinct.
+ *
+ * @param dtypedecls the datatype declarations from which the sort is
+ * created
+ * @return the datatype sorts
+ * @throws CVC5ApiException
+ */
+ public Sort[] mkDatatypeSorts(DatatypeDecl[] dtypedecls) throws CVC5ApiException
+ {
+ long[] declPointers = Utils.getPointers(dtypedecls);
+ long[] sortPointers = mkDatatypeSorts(pointer, declPointers);
+ Sort[] sorts = Utils.getSorts(this, sortPointers);
+ return sorts;
+ }
+
+ private native long[] mkDatatypeSorts(long pointer, long[] declPointers) throws CVC5ApiException;
+
+ /**
+ * Create a vector of datatype sorts using unresolved sorts. The names of
+ * the datatype declarations in dtypedecls must be distinct.
+ *
+ * This method is called when the DatatypeDecl objects dtypedecls have
+ * been built using "unresolved" sorts.
+ *
+ * We associate each sort in unresolvedSorts with exacly one datatype from
+ * dtypedecls. In particular, it must have the same name as exactly one
+ * datatype declaration in dtypedecls.
+ *
+ * When constructing datatypes, unresolved sorts are replaced by the
+ * datatype sort constructed for the datatype declaration it is associated
+ * with.
+ *
+ * @apiNote Create unresolved sorts with Solver::mkUnresolvedSort().
+ *
+ * @param dtypedecls the datatype declarations from which the sort is
+ * created
+ * @param unresolvedSorts the set of unresolved sorts
+ * @return the datatype sorts
+ * @throws CVC5ApiException
+ */
+ public List<Sort> mkDatatypeSorts(List<DatatypeDecl> dtypedecls, Set<Sort> unresolvedSorts)
+ throws CVC5ApiException
+ {
+ Sort[] array = mkDatatypeSorts(
+ dtypedecls.toArray(new DatatypeDecl[0]), unresolvedSorts.toArray(new Sort[0]));
+ return Arrays.asList(array);
+ }
+
+ /**
+ * Create a vector of datatype sorts using unresolved sorts. The names of
+ * the datatype declarations in dtypedecls must be distinct.
+ *
+ * This method is called when the DatatypeDecl objects dtypedecls have
+ * been built using "unresolved" sorts.
+ *
+ * We associate each sort in unresolvedSorts with exacly one datatype from
+ * dtypedecls. In particular, it must have the same name as exactly one
+ * datatype declaration in dtypedecls.
+ *
+ * When constructing datatypes, unresolved sorts are replaced by the
+ * datatype sort constructed for the datatype declaration it is associated
+ * with.
+ *
+ * @param dtypedecls the datatype declarations from which the sort is
+ * created
+ * @param unresolvedSorts the list of unresolved sorts
+ * @return the datatype sorts
+ */
+ public Sort[] mkDatatypeSorts(DatatypeDecl[] dtypedecls, Sort[] unresolvedSorts)
+ throws CVC5ApiException
+ {
+ long[] declPointers = Utils.getPointers(dtypedecls);
+ long[] unresolvedPointers = Utils.getPointers(unresolvedSorts);
+ long[] sortPointers = mkDatatypeSorts(pointer, declPointers, unresolvedPointers);
+ Sort[] sorts = Utils.getSorts(this, sortPointers);
+ return sorts;
+ }
+
+ private native long[] mkDatatypeSorts(
+ long pointer, long[] declPointers, long[] unresolvedPointers) throws CVC5ApiException;
+
+ /**
+ * Create function sort.
+ * @param domain the sort of the fuction argument
+ * @param codomain the sort of the function return value
+ * @return the function sort
+ */
+ public Sort mkFunctionSort(Sort domain, Sort codomain)
+ {
+ long sortPointer = mkFunctionSort(pointer, domain.getPointer(), codomain.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkFunctionSort(long pointer, long domainPointer, long codomainPointer);
+
+ /**
+ * Create function sort.
+ * @param sorts the sort of the function arguments
+ * @param codomain the sort of the function return value
+ * @return the function sort
+ */
+ public Sort mkFunctionSort(Sort[] sorts, Sort codomain)
+ {
+ long sortPointer = mkFunctionSort(pointer, Utils.getPointers(sorts), codomain.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkFunctionSort(long pointer, long[] sortPointers, long codomainPointer);
+
+ /**
+ * Create a sort parameter.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param symbol the name of the sort
+ * @return the sort parameter
+ */
+ public Sort mkParamSort(String symbol)
+ {
+ long sortPointer = mkParamSort(pointer, symbol);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkParamSort(long pointer, String symbol);
+
+ /**
+ * Create a predicate sort.
+ * @param sorts the list of sorts of the predicate
+ * @return the predicate sort
+ */
+ public Sort mkPredicateSort(Sort[] sorts)
+ {
+ long sortPointer = mkPredicateSort(pointer, Utils.getPointers(sorts));
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkPredicateSort(long pointer, long[] sortPointers);
+
+ /**
+ * Create a record sort
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param fields the list of fields of the record
+ * @return the record sort
+ */
+ public Sort mkRecordSort(Pair<String, Sort>[] fields)
+ {
+ long sortPointer = mkRecordSort(pointer, Utils.getPairs(fields));
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkRecordSort(long pointer, Pair<String, Long>[] fields);
+
+ /**
+ * Create a set sort.
+ * @param elemSort the sort of the set elements
+ * @return the set sort
+ */
+ public Sort mkSetSort(Sort elemSort)
+ {
+ long sortPointer = mkSetSort(pointer, elemSort.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkSetSort(long pointer, long elemSortPointer);
+ /**
+ * Create a bag sort.
+ * @param elemSort the sort of the bag elements
+ * @return the bag sort
+ */
+ public Sort mkBagSort(Sort elemSort)
+ {
+ long sortPointer = mkBagSort(pointer, elemSort.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkBagSort(long pointer, long elemSortPointer);
+
+ /**
+ * Create a sequence sort.
+ * @param elemSort the sort of the sequence elements
+ * @return the sequence sort
+ */
+ public Sort mkSequenceSort(Sort elemSort)
+ {
+ long sortPointer = mkSequenceSort(pointer, elemSort.getPointer());
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkSequenceSort(long pointer, long elemSortPointer);
+
+ /**
+ * Create an uninterpreted sort.
+ * @param symbol the name of the sort
+ * @return the uninterpreted sort
+ */
+ public Sort mkUninterpretedSort(String symbol)
+ {
+ long sortPointer = mkUninterpretedSort(pointer, symbol);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkUninterpretedSort(long pointer, String symbol);
+
+ /**
+ * Create an unresolved sort.
+ *
+ * This is for creating yet unresolved sort placeholders for mutually
+ * recursive datatypes.
+ *
+ * @param symbol the symbol of the sort
+ * @param arity the number of sort parameters of the sort
+ * @return the unresolved sort
+ * @throws CVC5ApiException
+ */
+ public Sort mkUnresolvedSort(String symbol, int arity) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(arity, "arity");
+ long sortPointer = mkUnresolvedSort(pointer, symbol, arity);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkUnresolvedSort(long pointer, String symbol, int arity);
+
+ /**
+ * Create an unresolved sort.
+ *
+ * This is for creating yet unresolved sort placeholders for mutually
+ * recursive datatypes without sort parameters.
+ *
+ * @param symbol the symbol of the sort
+ * @return the unresolved sort
+ * @throws CVC5ApiException
+ */
+ public Sort mkUnresolvedSort(String symbol) throws CVC5ApiException
+ {
+ return mkUnresolvedSort(symbol, 0);
+ }
+
+ /**
+ * Create a sort constructor sort.
+ *
+ * An uninterpreted sort constructor is an uninterpreted sort with
+ * arity > 0.
+ *
+ * @param symbol the symbol of the sort
+ * @param arity the arity of the sort (must be > 0)
+ * @return the sort constructor sort
+ * @throws CVC5ApiException
+ */
+ public Sort mkUninterpretedSortConstructorSort(String symbol, int arity) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(arity, "arity");
+ long sortPointer = mkUninterpretedSortConstructorSort(pointer, symbol, arity);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkUninterpretedSortConstructorSort(long pointer, String symbol, int arity);
+
+ /**
+ * Create a tuple sort.
+ * @param sorts of the elements of the tuple
+ * @return the tuple sort
+ */
+ public Sort mkTupleSort(Sort[] sorts)
+ {
+ long[] sortPointers = Utils.getPointers(sorts);
+ long sortPointer = mkTupleSort(pointer, sortPointers);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long mkTupleSort(long pointer, long[] sortPointers);
+
+ /* .................................................................... */
+ /* Create Terms */
+ /* .................................................................... */
+
+ /**
+ * Create 0-ary term of given kind.
+ * @param kind the kind of the term
+ * @return the Term
+ */
+ public Term mkTerm(Kind kind)
+ {
+ long termPointer = mkTerm(pointer, kind.getValue());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, int kindValue);
+
+ /**
+ * Create a unary term of given kind.
+ * @param kind the kind of the term
+ * @param child the child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Kind kind, Term child)
+ {
+ long termPointer = mkTerm(pointer, kind.getValue(), child.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, int kindValue, long childPointer);
+
+ /**
+ * Create binary term of given kind.
+ * @param kind the kind of the term
+ * @param child1 the first child of the term
+ * @param child2 the second child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Kind kind, Term child1, Term child2)
+ {
+ long termPointer = mkTerm(pointer, kind.getValue(), child1.getPointer(), child2.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, int kindValue, long child1Pointer, long child2Pointer);
+
+ /**
+ * Create ternary term of given kind.
+ * @param kind the kind of the term
+ * @param child1 the first child of the term
+ * @param child2 the second child of the term
+ * @param child3 the third child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Kind kind, Term child1, Term child2, Term child3)
+ {
+ long termPointer = mkTerm(
+ pointer, kind.getValue(), child1.getPointer(), child2.getPointer(), child3.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(
+ long pointer, int kindValue, long child1Pointer, long child2Pointer, long child3Pointer);
+ /**
+ * Create n-ary term of given kind.
+ * @param kind the kind of the term
+ * @param children the children of the term
+ * @return the Term
+ */
+ public Term mkTerm(Kind kind, Term[] children)
+ {
+ long[] childPointers = Utils.getPointers(children);
+ long termPointer = mkTerm(pointer, kind.getValue(), childPointers);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, int kindValue, long[] childrenPointers);
+
+ /**
+ * Create nullary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @return the Term
+ */
+ public Term mkTerm(Op op)
+ {
+ long termPointer = mkTerm(pointer, op.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, long opPointer);
+ /**
+ * Create unary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @param child the child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Op op, Term child)
+ {
+ long termPointer = mkTerm(pointer, op.getPointer(), child.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, long opPointer, long childPointer);
+
+ /**
+ * Create binary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @param child1 the first child of the term
+ * @param child2 the second child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Op op, Term child1, Term child2)
+ {
+ long termPointer = mkTerm(pointer, op.getPointer(), child1.getPointer(), child2.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, long opPointer, long child1Pointer, long child2Pointer);
+ /**
+ * Create ternary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @param child1 the first child of the term
+ * @param child2 the second child of the term
+ * @param child3 the third child of the term
+ * @return the Term
+ */
+ public Term mkTerm(Op op, Term child1, Term child2, Term child3)
+ {
+ long termPointer =
+ mkTerm(op.getPointer(), child1.getPointer(), child2.getPointer(), child3.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(
+ long pointer, long opPointer, long child1Pointer, long child2Pointer, long child3Pointer);
+
+ /**
+ * Create n-ary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @param children the children of the term
+ * @return the Term
+ */
+ public Term mkTerm(Op op, List<Term> children)
+ {
+ return mkTerm(op, children.toArray(new Term[0]));
+ }
+
+ /**
+ * Create n-ary term of given kind from a given operator.
+ * Create operators with mkOp().
+ * @param op the operator
+ * @param children the children of the term
+ * @return the Term
+ */
+ public Term mkTerm(Op op, Term[] children)
+ {
+ long[] childPointers = Utils.getPointers(children);
+ long termPointer = mkTerm(pointer, op.getPointer(), childPointers);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTerm(long pointer, long opPointer, long[] childrenPointers);
+
+ /**
+ * Create a tuple term. Terms are automatically converted if sorts are
+ * compatible.
+ * @param sorts The sorts of the elements in the tuple
+ * @param terms The elements in the tuple
+ * @return the tuple Term
+ */
+ public Term mkTuple(Sort[] sorts, Term[] terms)
+ {
+ long[] sortPointers = Utils.getPointers(sorts);
+ long[] termPointers = Utils.getPointers(terms);
+ long termPointer = mkTuple(pointer, sortPointers, termPointers);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTuple(long pointer, long[] sortPointers, long[] termPointers);
+
+ /* .................................................................... */
+ /* Create Operators */
+ /* .................................................................... */
+
+ /**
+ * Create an operator for a builtin Kind
+ * The Kind may not be the Kind for an indexed operator
+ * (e.g. BITVECTOR_EXTRACT).
+ *
+ * @apiNote In this case, the Op simply wraps the Kind. The Kind can be used
+ * in mkTerm directly without creating an op first.
+ *
+ * @param kind the kind to wrap
+ */
+ public Op mkOp(Kind kind)
+ {
+ long opPointer = mkOp(pointer, kind.getValue());
+ return new Op(this, opPointer);
+ }
+
+ private native long mkOp(long pointer, int kindValue);
+ /**
+ * Create operator of kind:
+ * - RECORD_UPDATE
+ * - DIVISIBLE (to support arbitrary precision integers)
+ * See enum {@link Kind} for a description of the parameters.
+ * @param kind the kind of the operator
+ * @param arg the string argument to this operator
+ */
+ public Op mkOp(Kind kind, String arg)
+ {
+ long opPointer = mkOp(pointer, kind.getValue(), arg);
+ return new Op(this, opPointer);
+ }
+
+ private native long mkOp(long pointer, int kindValue, String arg);
+
+ /**
+ * Create operator of kind:
+ * - DIVISIBLE
+ * - BITVECTOR_REPEAT
+ * - BITVECTOR_ZERO_EXTEND
+ * - BITVECTOR_SIGN_EXTEND
+ * - BITVECTOR_ROTATE_LEFT
+ * - BITVECTOR_ROTATE_RIGHT
+ * - INT_TO_BITVECTOR
+ * - FLOATINGPOINT_TO_UBV
+ * - FLOATINGPOINT_TO_UBV_TOTAL
+ * - FLOATINGPOINT_TO_SBV
+ * - FLOATINGPOINT_TO_SBV_TOTAL
+ * - TUPLE_UPDATE
+ * See enum {@link Kind} for a description of the parameters.
+ * @param kind the kind of the operator
+ * @param arg the unsigned int argument to this operator
+ * @throws CVC5ApiException
+ */
+ public Op mkOp(Kind kind, int arg) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(arg, "arg");
+ long opPointer = mkOp(pointer, kind.getValue(), arg);
+ return new Op(this, opPointer);
+ }
+
+ private native long mkOp(long pointer, int kindValue, int arg);
+
+ /**
+ * Create operator of Kind:
+ * - BITVECTOR_EXTRACT
+ * - FLOATINGPOINT_TO_FP_FROM_IEEE_BV
+ * - FLOATINGPOINT_TO_FP_FROM_FP
+ * - FLOATINGPOINT_TO_FP_FROM_REAL
+ * - FLOATINGPOINT_TO_FP_FROM_SBV
+ * - FLOATINGPOINT_TO_FP_FROM_UBV
+ * See enum {@link Kind} for a description of the parameters.
+ * @param kind the kind of the operator
+ * @param arg1 the first unsigned int argument to this operator
+ * @param arg2 the second unsigned int argument to this operator
+ * @throws CVC5ApiException
+ */
+ public Op mkOp(Kind kind, int arg1, int arg2) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(arg1, "arg1");
+ Utils.validateUnsigned(arg2, "arg2");
+ long opPointer = mkOp(pointer, kind.getValue(), arg1, arg2);
+ return new Op(this, opPointer);
+ }
+
+ private native long mkOp(long pointer, int kindValue, int arg1, int arg2);
+
+ /**
+ * Create operator of Kind:
+ * - TUPLE_PROJECT
+ * See enum {@link Kind} for a description of the parameters.
+ * @param kind the kind of the operator
+ * @param args the arguments (indices) of the operator
+ * @throws CVC5ApiException
+ */
+ public Op mkOp(Kind kind, int[] args) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(args, "args");
+ long opPointer = mkOp(pointer, kind.getValue(), args);
+ return new Op(this, opPointer);
+ }
+
+ private native long mkOp(long pointer, int kindValue, int[] args);
+
+ /* .................................................................... */
+ /* Create Constants */
+ /* .................................................................... */
+
+ /**
+ * Create a Boolean true constant.
+ * @return the true constant
+ */
+ public Term mkTrue()
+ {
+ long termPointer = mkTrue(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkTrue(long pointer);
+ /**
+ * Create a Boolean false constant.
+ * @return the false constant
+ */
+ public Term mkFalse()
+ {
+ long termPointer = mkFalse(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFalse(long pointer);
+ /**
+ * Create a Boolean constant.
+ * @return the Boolean constant
+ * @param val the value of the constant
+ */
+ public Term mkBoolean(boolean val)
+ {
+ long termPointer = mkBoolean(pointer, val);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkBoolean(long pointer, boolean val);
+ /**
+ * Create a constant representing the number Pi.
+ * @return a constant representing Pi
+ */
+ public Term mkPi()
+ {
+ long termPointer = mkPi(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkPi(long pointer);
+ /**
+ * Create an integer constant from a string.
+ * @param s the string representation of the constant, may represent an
+ * integer (e.g., "123").
+ * @return a constant of sort Integer assuming 's' represents an integer)
+ * @throws CVC5ApiException
+ */
+ public Term mkInteger(String s) throws CVC5ApiException
+ {
+ long termPointer = mkInteger(pointer, s);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkInteger(long pointer, String s) throws CVC5ApiException;
+
+ /**
+ * Create an integer constant from a c++ int.
+ * @param val the value of the constant
+ * @return a constant of sort Integer
+ */
+ public Term mkInteger(long val)
+ {
+ long termPointer = mkInteger(pointer, val);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkInteger(long pointer, long val);
+ /**
+ * Create a real constant from a string.
+ * @param s the string representation of the constant, may represent an
+ * integer (e.g., "123") or real constant (e.g., "12.34" or
+ * "12/34").
+ * @return a constant of sort Real
+ * @throws CVC5ApiException
+ */
+ public Term mkReal(String s) throws CVC5ApiException
+ {
+ long termPointer = mkReal(pointer, s);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkReal(long pointer, String s) throws CVC5ApiException;
+ /**
+ * Create a real constant from an integer.
+ * @param val the value of the constant
+ * @return a constant of sort Integer
+ */
+ public Term mkReal(long val)
+ {
+ long termPointer = mkRealValue(pointer, val);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkRealValue(long pointer, long val);
+ /**
+ * Create a real constant from a rational.
+ * @param num the value of the numerator
+ * @param den the value of the denominator
+ * @return a constant of sort Real
+ */
+ public Term mkReal(long num, long den)
+ {
+ long termPointer = mkReal(pointer, num, den);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkReal(long pointer, long num, long den);
+
+ /**
+ * Create a regular expression none (re.none) term.
+ * @return the none term
+ */
+ public Term mkRegexpNone()
+ {
+ long termPointer = mkRegexpNone(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkRegexpNone(long pointer);
+
+ /**
+ * Create a regular expression all (re.all) term.
+ * @return the all term
+ */
+ public Term mkRegexpAll()
+ {
+ long termPointer = mkRegexpAll(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkRegexpAll(long pointer);
+
+ /**
+ * Create a regular expression allchar (re.allchar) term.
+ * @return the allchar term
+ */
+ public Term mkRegexpAllchar()
+ {
+ long termPointer = mkRegexpAllchar(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkRegexpAllchar(long pointer);
+
+ /**
+ * Create a constant representing an empty set of the given sort.
+ * @param sort the sort of the set elements.
+ * @return the empty set constant
+ */
+ public Term mkEmptySet(Sort sort)
+ {
+ long termPointer = mkEmptySet(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkEmptySet(long pointer, long sortPointer);
+ /**
+ * Create a constant representing an empty bag of the given sort.
+ * @param sort the sort of the bag elements.
+ * @return the empty bag constant
+ */
+ public Term mkEmptyBag(Sort sort)
+ {
+ long termPointer = mkEmptyBag(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkEmptyBag(long pointer, long sortPointer);
+
+ /**
+ * Create a separation logic empty term.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return the separation logic empty term
+ */
+ public Term mkSepEmp()
+ {
+ long termPointer = mkSepEmp(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkSepEmp(long pointer);
+
+ /**
+ * Create a separation logic nil term.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param sort the sort of the nil term
+ * @return the separation logic nil term
+ */
+ public Term mkSepNil(Sort sort)
+ {
+ long termPointer = mkSepNil(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkSepNil(long pointer, long sortPointer);
+
+ /**
+ * Create a String constant.
+ * @param s the string this constant represents
+ * @return the String constant
+ */
+ public Term mkString(String s)
+ {
+ return mkString(s, false);
+ }
+
+ /**
+ * Create a String constant.
+ * @param s the string this constant represents
+ * @param useEscSequences determines whether escape sequences in `s`
+ * should be converted to the corresponding unicode character
+ * @return the String constant
+ */
+ public Term mkString(String s, boolean useEscSequences)
+ {
+ // TODO: review unicode
+ long termPointer = mkString(pointer, s, useEscSequences);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkString(long pointer, String s, boolean useEscSequences);
+
+ /**
+ * Create a String constant.
+ * @param s a list of unsigned (unicode) values this constant represents
+ * as
+ * string
+ * @return the String constant
+ * @throws CVC5ApiException
+ */
+ public Term mkString(int[] s) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(s, "s");
+ long termPointer = mkString(pointer, s);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkString(long pointer, int[] s);
+
+ /**
+ * Create an empty sequence of the given element sort.
+ * @param sort The element sort of the sequence.
+ * @return the empty sequence with given element sort.
+ */
+ public Term mkEmptySequence(Sort sort)
+ {
+ long termPointer = mkEmptySequence(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkEmptySequence(long pointer, long sortPointer);
+
+ /**
+ * Create a universe set of the given sort.
+ * @param sort the sort of the set elements
+ * @return the universe set constant
+ */
+ public Term mkUniverseSet(Sort sort)
+ {
+ long termPointer = mkUniverseSet(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkUniverseSet(long pointer, long sortPointer);
+
+ /**
+ * Create a bit-vector constant of given size and value = 0.
+ * @param size the bit-width of the bit-vector sort
+ * @return the bit-vector constant
+ */
+ public Term mkBitVector(int size) throws CVC5ApiException
+ {
+ return mkBitVector(size, 0);
+ }
+
+ /**
+ * Create a bit-vector constant of given size and value.
+ *
+ * @apiNote The given value must fit into a bit-vector of the given size.
+ *
+ * @param size the bit-width of the bit-vector sort
+ * @param val the value of the constant
+ * @return the bit-vector constant
+ * @throws CVC5ApiException
+ */
+ public Term mkBitVector(int size, long val) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(size, "size");
+ Utils.validateUnsigned(val, "val");
+ long termPointer = mkBitVector(pointer, size, val);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkBitVector(long pointer, int size, long val);
+
+ /**
+ * Create a bit-vector constant of a given bit-width from a given string of
+ * base 2, 10 or 16.
+ *
+ * @apiNote The given value must fit into a bit-vector of the given size.
+ *
+ * @param size the bit-width of the constant
+ * @param s the string representation of the constant
+ * @param base the base of the string representation (2, 10, or 16)
+ * @return the bit-vector constant
+ * @throws CVC5ApiException
+ */
+ public Term mkBitVector(int size, String s, int base) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(size, "size");
+ Utils.validateUnsigned(base, "base");
+ long termPointer = mkBitVector(pointer, size, s, base);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkBitVector(long pointer, int size, String s, int base);
+
+ /**
+ * Create a constant array with the provided constant value stored at
+ * every index
+ * @param sort the sort of the constant array (must be an array sort)
+ * @param val the constant value to store (must match the sort's element
+ * sort)
+ * @return the constant array term
+ */
+ public Term mkConstArray(Sort sort, Term val)
+ {
+ long termPointer = mkConstArray(pointer, sort.getPointer(), val.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkConstArray(long pointer, long sortPointer, long valPointer);
+ /**
+ * Create a positive infinity floating-point constant.
+ * @param exp Number of bits in the exponent
+ * @param sig Number of bits in the significand
+ * @return the floating-point constant
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPointPosInf(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPointPosInf(pointer, exp, sig);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPointPosInf(long pointer, int exp, int sig);
+ /**
+ * Create a negative infinity floating-point constant.
+ * @param exp Number of bits in the exponent
+ * @param sig Number of bits in the significand
+ * @return the floating-point constant
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPointNegInf(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPointNegInf(pointer, exp, sig);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPointNegInf(long pointer, int exp, int sig);
+ /**
+ * Create a not-a-number (NaN) floating-point constant.
+ * @param exp Number of bits in the exponent
+ * @param sig Number of bits in the significand
+ * @return the floating-point constant
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPointNaN(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPointNaN(pointer, exp, sig);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPointNaN(long pointer, int exp, int sig);
+
+ /**
+ * Create a positive zero (+0.0) floating-point constant.
+ * @param exp Number of bits in the exponent
+ * @param sig Number of bits in the significand
+ * @return the floating-point constant
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPointPosZero(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPointPosZero(pointer, exp, sig);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPointPosZero(long pointer, int exp, int sig);
+
+ /**
+ * Create a negative zero (-0.0) floating-point constant.
+ * @param exp Number of bits in the exponent
+ * @param sig Number of bits in the significand
+ * @return the floating-point constant
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPointNegZero(int exp, int sig) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPointNegZero(pointer, exp, sig);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPointNegZero(long pointer, int exp, int sig);
+
+ /**
+ * Create a roundingmode constant.
+ * @param rm the floating point rounding mode this constant represents
+ */
+ public Term mkRoundingMode(RoundingMode rm)
+ {
+ long termPointer = mkRoundingMode(pointer, rm.getValue());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkRoundingMode(long pointer, int rm);
+
+ /**
+ * Create a floating-point constant.
+ * @param exp Size of the exponent
+ * @param sig Size of the significand
+ * @param val Value of the floating-point constant as a bit-vector term
+ * @throws CVC5ApiException
+ */
+ public Term mkFloatingPoint(int exp, int sig, Term val) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(exp, "exp");
+ Utils.validateUnsigned(sig, "sig");
+ long termPointer = mkFloatingPoint(pointer, exp, sig, val.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkFloatingPoint(long pointer, int exp, int sig, long valPointer);
+
+ /**
+ * Create a cardinality constraint for an uninterpreted sort.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param sort the sort the cardinality constraint is for
+ * @param upperBound the upper bound on the cardinality of the sort
+ * @return the cardinality constraint
+ * @throws CVC5ApiException
+ */
+ public Term mkCardinalityConstraint(Sort sort, int upperBound) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(upperBound, "upperBound");
+ long termPointer = mkCardinalityConstraint(pointer, sort.getPointer(), upperBound);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkCardinalityConstraint(long pointer, long sortPointer, int upperBound);
+
+ /* .................................................................... */
+ /* Create Variables */
+ /* .................................................................... */
+
+ /**
+ * Create (first-order) constant (0-arity function symbol).
+ * SMT-LIB:
+ * {@code
+ * ( declare-const <symbol> <sort> )
+ * ( declare-fun <symbol> ( ) <sort> )
+ * }
+ *
+ * @param sort the sort of the constant
+ * @param symbol the name of the constant
+ * @return the first-order constant
+ */
+ public Term mkConst(Sort sort, String symbol)
+ {
+ long termPointer = mkConst(pointer, sort.getPointer(), symbol);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkConst(long pointer, long sortPointer, String symbol);
+
+ /**
+ * Create (first-order) constant (0-arity function symbol), with a default
+ * symbol name.
+ *
+ * @param sort the sort of the constant
+ * @return the first-order constant
+ */
+ public Term mkConst(Sort sort)
+ {
+ long termPointer = mkConst(pointer, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long mkConst(long pointer, long sortPointer);
+
+ /**
+ * Create a bound variable to be used in a binder (i.e. a quantifier, a
+ * lambda, or a witness binder).
+ * @param sort the sort of the variable
+ * @return the variable
+ */
+ public Term mkVar(Sort sort)
+ {
+ return mkVar(sort, "");
+ }
+
+ /**
+ * Create a bound variable to be used in a binder (i.e. a quantifier, a
+ * lambda, or a witness binder).
+ * @param sort the sort of the variable
+ * @param symbol the name of the variable
+ * @return the variable
+ */
+ public Term mkVar(Sort sort, String symbol)
+ {
+ long termPointer = mkVar(pointer, sort.getPointer(), symbol);
+ return new Term(this, termPointer);
+ }
+
+ private native long mkVar(long pointer, long sortPointer, String symbol);
+
+ /* .................................................................... */
+ /* Create datatype constructor declarations */
+ /* .................................................................... */
+
+ /**
+ * Create a datatype constructor declaration.
+ * @param name the name of the datatype constructor
+ * @return the DatatypeConstructorDecl
+ */
+ public DatatypeConstructorDecl mkDatatypeConstructorDecl(String name)
+ {
+ long declPointer = mkDatatypeConstructorDecl(pointer, name);
+ return new DatatypeConstructorDecl(this, declPointer);
+ }
+
+ private native long mkDatatypeConstructorDecl(long pointer, String name);
+
+ /* .................................................................... */
+ /* Create datatype declarations */
+ /* .................................................................... */
+
+ /**
+ * Create a datatype declaration.
+ * @param name the name of the datatype
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name)
+ {
+ return mkDatatypeDecl(name, false);
+ }
+
+ /**
+ * Create a datatype declaration.
+ * @param name the name of the datatype
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, boolean isCoDatatype)
+ {
+ long declPointer = mkDatatypeDecl(pointer, name, isCoDatatype);
+ return new DatatypeDecl(this, declPointer);
+ }
+
+ private native long mkDatatypeDecl(long pointer, String name, boolean isCoDatatype);
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param param the sort parameter
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, Sort param)
+ {
+ return mkDatatypeDecl(name, param, false);
+ }
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param param the sort parameter
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, Sort param, boolean isCoDatatype)
+ {
+ long declPointer = mkDatatypeDecl(pointer, name, param.getPointer(), isCoDatatype);
+ return new DatatypeDecl(this, declPointer);
+ }
+
+ private native long mkDatatypeDecl(
+ long pointer, String name, long paramPointer, boolean isCoDatatype);
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param params a list of sort parameters
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, List<Sort> params)
+ {
+ return mkDatatypeDecl(name, params.toArray(new Sort[0]));
+ }
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param params a list of sort parameters
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, Sort[] params)
+ {
+ return mkDatatypeDecl(name, params, false);
+ }
+
+ /**
+ * Create a datatype declaration.
+ * Create sorts parameter with Solver::mkParamSort().
+ * @param name the name of the datatype
+ * @param params a list of sort parameters
+ * @param isCoDatatype true if a codatatype is to be constructed
+ * @return the DatatypeDecl
+ */
+ public DatatypeDecl mkDatatypeDecl(String name, Sort[] params, boolean isCoDatatype)
+ {
+ long[] paramPointers = Utils.getPointers(params);
+ long declPointer = mkDatatypeDecl(pointer, name, paramPointers, isCoDatatype);
+ return new DatatypeDecl(this, declPointer);
+ }
+
+ private native long mkDatatypeDecl(
+ long pointer, String name, long[] paramPointers, boolean isCoDatatype);
+
+ /* .................................................................... */
+ /* Formula Handling */
+ /* .................................................................... */
+
+ /**
+ * Simplify a formula without doing "much" work. Does not involve
+ * the SAT Engine in the simplification, but uses the current
+ * definitions, assertions, and the current partial model, if one
+ * has been constructed. It also involves theory normalization.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param t the formula to simplify
+ * @return the simplified formula
+ */
+ public Term simplify(Term t)
+ {
+ long termPointer = simplify(pointer, t.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long simplify(long pointer, long termPointer);
+
+ /**
+ * Assert a formula.
+ * SMT-LIB:
+ * {@code
+ * ( assert <term> )
+ * }
+ * @param term the formula to assert
+ */
+ public void assertFormula(Term term)
+ {
+ assertFormula(pointer, term.getPointer());
+ }
+
+ private native void assertFormula(long pointer, long termPointer);
+
+ /**
+ * Check satisfiability.
+ * SMT-LIB:
+ * {@code
+ * ( check-sat )
+ * }
+ * @return the result of the satisfiability check.
+ */
+ public Result checkSat()
+ {
+ long resultPointer = checkSat(pointer);
+ return new Result(this, resultPointer);
+ }
+
+ private native long checkSat(long pointer);
+ /**
+ * Check satisfiability assuming the given formula.
+ * SMT-LIB:
+ * {@code
+ * ( check-sat-assuming ( <prop_literal> ) )
+ * }
+ * @param assumption the formula to assume
+ * @return the result of the satisfiability check.
+ */
+ public Result checkSatAssuming(Term assumption)
+ {
+ long resultPointer = checkSatAssuming(pointer, assumption.getPointer());
+ return new Result(this, resultPointer);
+ }
+
+ private native long checkSatAssuming(long pointer, long assumptionPointer);
+
+ /**
+ * Check satisfiability assuming the given formulas.
+ * SMT-LIB:
+ * {@code
+ * ( check-sat-assuming ( <prop_literal>+ ) )
+ * }
+ * @param assumptions the formulas to assume
+ * @return the result of the satisfiability check.
+ */
+ public Result checkSatAssuming(Term[] assumptions)
+ {
+ long[] pointers = Utils.getPointers(assumptions);
+ long resultPointer = checkSatAssuming(pointer, pointers);
+ return new Result(this, resultPointer);
+ }
+
+ private native long checkSatAssuming(long pointer, long[] assumptionPointers);
+
+ /**
+ * Create datatype sort.
+ * SMT-LIB:
+ * {@code
+ * ( declare-datatype <symbol> <datatype_decl> )
+ * }
+ * @param symbol the name of the datatype sort
+ * @param ctors the constructor declarations of the datatype sort
+ * @return the datatype sort
+ */
+ public Sort declareDatatype(String symbol, DatatypeConstructorDecl[] ctors)
+ {
+ long[] pointers = Utils.getPointers(ctors);
+ long sortPointer = declareDatatype(pointer, symbol, pointers);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long declareDatatype(long pointer, String symbol, long[] declPointers);
+
+ /**
+ * Declare n-ary function symbol.
+ * SMT-LIB:
+ * {@code
+ * ( declare-fun <symbol> ( <sort>* ) <sort> )
+ * }
+ * @param symbol the name of the function
+ * @param sorts the sorts of the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @return the function
+ */
+ public Term declareFun(String symbol, Sort[] sorts, Sort sort)
+ {
+ long[] sortPointers = Utils.getPointers(sorts);
+ long termPointer = declareFun(pointer, symbol, sortPointers, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long declareFun(
+ long pointer, String symbol, long[] sortPointers, long sortPointer);
+
+ /**
+ * Declare uninterpreted sort.
+ * SMT-LIB:
+ * {@code
+ * ( declare-sort <symbol> <numeral> )
+ * }
+ *
+ * @apiNote This corresponds to mkUninterpretedSort() const if arity = 0, and
+ * to mkUninterpretedSortConstructorSort() const if arity > 0.
+ *
+ * @param symbol the name of the sort
+ * @param arity the arity of the sort
+ * @return the sort
+ * @throws CVC5ApiException
+ */
+ public Sort declareSort(String symbol, int arity) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(arity, "arity");
+ long sortPointer = declareSort(pointer, symbol, arity);
+ return new Sort(this, sortPointer);
+ }
+
+ private native long declareSort(long pointer, String symbol, int arity);
+
+ /**
+ * Define n-ary function in the current context.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun <function_def> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @param term the function body
+ * @return the function
+ */
+ public Term defineFun(String symbol, Term[] boundVars, Sort sort, Term term)
+ {
+ return defineFun(symbol, boundVars, sort, term, false);
+ }
+
+ /**
+ * Define n-ary function.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun <function_def> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @param term the function body
+ * @param global determines whether this definition is global (i.e. persists
+ * when popping the context)
+ * @return the function
+ */
+ public Term defineFun(String symbol, Term[] boundVars, Sort sort, Term term, boolean global)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer =
+ defineFun(pointer, symbol, boundVarPointers, sort.getPointer(), term.getPointer(), global);
+ return new Term(this, termPointer);
+ }
+
+ private native long defineFun(long pointer,
+ String symbol,
+ long[] boundVarPointers,
+ long sortPointer,
+ long termPointer,
+ boolean global);
+
+ /**
+ * Define recursive function in the current context.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun-rec <function_def> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @param term the function body
+ * @return the function
+ */
+ public Term defineFunRec(String symbol, Term[] boundVars, Sort sort, Term term)
+ {
+ return defineFunRec(symbol, boundVars, sort, term, false);
+ }
+
+ /**
+ * Define recursive function.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun-rec <function_def> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @param term the function body
+ * @param global determines whether this definition is global (i.e. persists
+ * when popping the context)
+ * @return the function
+ */
+ public Term defineFunRec(String symbol, Term[] boundVars, Sort sort, Term term, boolean global)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer = defineFunRec(
+ pointer, symbol, boundVarPointers, sort.getPointer(), term.getPointer(), global);
+ return new Term(this, termPointer);
+ }
+
+ private native long defineFunRec(long pointer,
+ String symbol,
+ long[] boundVarPointers,
+ long sortPointer,
+ long termPointer,
+ boolean global);
+
+ /**
+ * Define recursive function in the current context.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun-rec <function_def> )
+ * }
+ * Create parameter 'fun' with mkConst().
+ * @param fun the sorted function
+ * @param boundVars the parameters to this function
+ * @param term the function body
+ * @return the function
+ */
+
+ public Term defineFunRec(Term fun, Term[] boundVars, Term term)
+ {
+ return defineFunRec(fun, boundVars, term, false);
+ }
+
+ /**
+ * Define recursive function.
+ * SMT-LIB:
+ * {@code
+ * ( define-fun-rec <function_def> )
+ * }
+ * Create parameter 'fun' with mkConst().
+ * @param fun the sorted function
+ * @param boundVars the parameters to this function
+ * @param term the function body
+ * @param global determines whether this definition is global (i.e. persists
+ * when popping the context)
+ * @return the function
+ */
+ public Term defineFunRec(Term fun, Term[] boundVars, Term term, boolean global)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer =
+ defineFunRec(pointer, fun.getPointer(), boundVarPointers, term.getPointer(), global);
+ return new Term(this, termPointer);
+ }
+
+ private native long defineFunRec(
+ long pointer, long funPointer, long[] boundVarPointers, long termPointer, boolean global);
+
+ /**
+ * Define recursive functions in the current context.
+ * SMT-LIB:
+ * {@code
+ * ( define-funs-rec ( <function_decl>^{n+1} ) ( <term>^{n+1} ) )
+ * }
+ * Create elements of parameter 'funs' with mkConst().
+ * @param funs the sorted functions
+ * @param boundVars the list of parameters to the functions
+ * @param terms the list of function bodies of the functions
+ */
+ public void defineFunsRec(Term[] funs, Term[][] boundVars, Term[] terms)
+ {
+ defineFunsRec(funs, boundVars, terms, false);
+ }
+ /**
+ * Define recursive functions.
+ * SMT-LIB:
+ * {@code
+ * ( define-funs-rec ( <function_decl>^{n+1} ) ( <term>^{n+1} ) )
+ * }
+ * Create elements of parameter 'funs' with mkConst().
+ * @param funs the sorted functions
+ * @param boundVars the list of parameters to the functions
+ * @param terms the list of function bodies of the functions
+ * @param global determines whether this definition is global (i.e. persists
+ * when popping the context)
+ */
+ public void defineFunsRec(Term[] funs, Term[][] boundVars, Term[] terms, boolean global)
+ {
+ long[] funPointers = Utils.getPointers(funs);
+ long[][] boundVarPointers = Utils.getPointers(boundVars);
+ long[] termPointers = Utils.getPointers(terms);
+ defineFunsRec(pointer, funPointers, boundVarPointers, termPointers, global);
+ }
+
+ private native void defineFunsRec(long pointer,
+ long[] funPointers,
+ long[][] boundVarPointers,
+ long[] termPointers,
+ boolean global);
+
+ /**
+ * Get a list of literals that are entailed by the current set of assertions
+ * SMT-LIB:
+ * {@code
+ * ( get-learned-literals )
+ * }
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return the list of learned literals
+ */
+ public Term[] getLearnedLiterals()
+ {
+ long[] retPointers = getLearnedLiterals(pointer);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getLearnedLiterals(long pointer);
+
+ /**
+ * Get the list of asserted formulas.
+ * SMT-LIB:
+ * {@code
+ * ( get-assertions )
+ * }
+ * @return the list of asserted formulas
+ */
+ public Term[] getAssertions()
+ {
+ long[] retPointers = getAssertions(pointer);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getAssertions(long pointer);
+
+ /**
+ * Get info from the solver.
+ * SMT-LIB: {@code ( get-info <info_flag> ) }
+ * @return the info
+ */
+ public String getInfo(String flag)
+ {
+ return getInfo(pointer, flag);
+ }
+
+ private native String getInfo(long pointer, String flag);
+
+ /**
+ * Get the value of a given option.
+ * SMT-LIB:
+ * {@code
+ * ( get-option <keyword> )
+ * }
+ * @param option the option for which the value is queried
+ * @return a string representation of the option value
+ */
+ public String getOption(String option)
+ {
+ return getOption(pointer, option);
+ }
+
+ private native String getOption(long pointer, String option);
+
+ /**
+ * Get all option names that can be used with `setOption`, `getOption` and
+ * `getOptionInfo`.
+ * @return all option names
+ */
+ public String[] getOptionNames()
+ {
+ return getOptionNames(pointer);
+ }
+
+ private native String[] getOptionNames(long pointer);
+
+ /**
+ * Get some information about the given option. Check the `OptionInfo` class
+ * for more details on which information is available.
+ * @return information about the given option
+ */
+ public OptionInfo getOptionInfo(String option)
+ {
+ long optionPointer = getOptionInfo(pointer, option);
+ return new OptionInfo(this, optionPointer);
+ }
+
+ private native long getOptionInfo(long pointer, String option);
+
+ /**
+ * Get the set of unsat ("failed") assumptions.
+ * SMT-LIB:
+ * {@code
+ * ( get-unsat-assumptions )
+ * }
+ * Requires to enable option 'produce-unsat-assumptions'.
+ * @return the set of unsat assumptions.
+ */
+ public Term[] getUnsatAssumptions()
+ {
+ long[] retPointers = getUnsatAssumptions(pointer);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getUnsatAssumptions(long pointer);
+
+ /**
+ * Get the unsatisfiable core.
+ * SMT-LIB:
+ * {@code
+ * (get-unsat-core)
+ * }
+ * Requires to enable option 'produce-unsat-cores'.
+ *
+ * @apiNote In contrast to SMT-LIB, the API does not distinguish between
+ * named and unnamed assertions when producing an unsatisfiable
+ * core. Additionally, the API allows this option to be called after
+ * a check with assumptions. A subset of those assumptions may be
+ * included in the unsatisfiable core returned by this method.
+ *
+ * @return a set of terms representing the unsatisfiable core
+ */
+ public Term[] getUnsatCore()
+ {
+ long[] retPointers = getUnsatCore(pointer);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getUnsatCore(long pointer);
+
+ /**
+ * Get a difficulty estimate for an asserted formula. This method is
+ * intended to be called immediately after any response to a checkSat.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return a map from (a subset of) the input assertions to a real value that
+ * is an estimate of how difficult each assertion was to solve. Unmentioned
+ * assertions can be assumed to have zero difficulty.
+ */
+ public Map<Term, Term> getDifficulty()
+ {
+ Map<Long, Long> map = getDifficulty(pointer);
+ Map<Term, Term> ret = new HashMap<>();
+ for (Map.Entry<Long, Long> entry : map.entrySet())
+ {
+ Term key = new Term(this, entry.getKey());
+ Term value = new Term(this, entry.getValue());
+ ret.put(key, value);
+ }
+ return ret;
+ }
+
+ private native Map<Long, Long> getDifficulty(long pointer);
+
+ /**
+ * Get the refutation proof
+ * SMT-LIB:
+ * {@code
+ * ( get-proof )
+ * }
+ * Requires to enable option 'produce-proofs'.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return a string representing the proof, according to the value of
+ * proof-format-mode.
+ */
+ public String getProof()
+ {
+ return getProof(pointer);
+ }
+
+ private native String getProof(long pointer);
+
+ /**
+ * Get the value of the given term in the current model.
+ * SMT-LIB:
+ * {@code
+ * ( get-value ( <term> ) )
+ * }
+ * @param term the term for which the value is queried
+ * @return the value of the given term
+ */
+ public Term getValue(Term term)
+ {
+ long termPointer = getValue(pointer, term.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long getValue(long pointer, long termPointer);
+
+ /**
+ * Get the values of the given terms in the current model.
+ * SMT-LIB:
+ * {@code
+ * ( get-value ( <term>+ ) )
+ * }
+ * @param terms the terms for which the value is queried
+ * @return the values of the given terms
+ */
+ public Term[] getValue(Term[] terms)
+ {
+ long[] pointers = Utils.getPointers(terms);
+ long[] retPointers = getValue(pointer, pointers);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getValue(long pointer, long[] termPointers);
+
+ /**
+ * Get the domain elements of uninterpreted sort s in the current model. The
+ * current model interprets s as the finite sort whose domain elements are
+ * given in the return value of this method.
+ *
+ * @param s The uninterpreted sort in question
+ * @return the domain elements of s in the current model
+ */
+ public Term[] getModelDomainElements(Sort s)
+ {
+ long[] pointers = getModelDomainElements(pointer, s.getPointer());
+ return Utils.getTerms(this, pointers);
+ }
+
+ private native long[] getModelDomainElements(long pointer, long sortPointer);
+
+ /**
+ * This returns false if the model value of free constant v was not essential
+ * for showing the satisfiability of the last call to checkSat using the
+ * current model. This method will only return false (for any v) if
+ * the model-cores option has been set.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param v The term in question
+ * @return true if v is a model core symbol
+ */
+ public boolean isModelCoreSymbol(Term v)
+ {
+ return isModelCoreSymbol(pointer, v.getPointer());
+ }
+
+ private native boolean isModelCoreSymbol(long pointer, long termPointer);
+
+ /**
+ * Get the model
+ * SMT-LIB:
+ * {@code
+ * ( get-model )
+ * }
+ * Requires to enable option 'produce-models'.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param sorts The list of uninterpreted sorts that should be printed in the
+ * model.
+ * @param vars The list of free constants that should be printed in the
+ * model. A subset of these may be printed based on isModelCoreSymbol.
+ * @return a string representing the model.
+ */
+ public String getModel(Sort[] sorts, Term[] vars)
+ {
+ long[] sortPointers = Utils.getPointers(sorts);
+ long[] varPointers = Utils.getPointers(vars);
+ return getModel(pointer, sortPointers, varPointers);
+ }
+
+ private native String getModel(long pointer, long[] sortPointers, long[] varPointers);
+
+ /**
+ * Do quantifier elimination.
+ * SMT-LIB:
+ * {@code
+ * ( get-qe <q> )
+ * }
+ * Quantifier Elimination is is only complete for logics such as LRA,
+ * LIA and BV.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param q a quantified formula of the form:
+ * Q x1...xn. P( x1...xn, y1...yn )
+ * where P( x1...xn, y1...yn ) is a quantifier-free formula
+ * @return a formula ret such that, given the current set of formulas A
+ * asserted to this solver:
+ * - ( A ^ q ) and ( A ^ ret ) are equivalent
+ * - ret is quantifier-free formula containing only free variables in
+ * y1...yn.
+ */
+ public Term getQuantifierElimination(Term q)
+ {
+ long termPointer = getQuantifierElimination(pointer, q.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long getQuantifierElimination(long pointer, long qPointer);
+
+ /**
+ * Do partial quantifier elimination, which can be used for incrementally
+ * computing the result of a quantifier elimination.
+ * SMT-LIB:
+ * {@code
+ * ( get-qe-disjunct <q> )
+ * }
+ * Quantifier Elimination is is only complete for logics such as LRA,
+ * LIA and BV.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param q a quantified formula of the form:
+ * Q x1...xn. P( x1...xn, y1...yn )
+ * where P( x1...xn, y1...yn ) is a quantifier-free formula
+ * @return a formula ret such that, given the current set of formulas A
+ * asserted to this solver:
+ * - {@code (A ^ q) => (A ^ ret)} if Q is forall or {@code (A ^ ret) => (A ^ q)} if Q is
+ * exists,
+ * - ret is quantifier-free formula containing only free variables in
+ * y1...yn,
+ * - If Q is exists, let A^Q_n be the formula
+ * {@code A ^ ~ret^Q_1 ^ ... ^ ~ret^Q_n}
+ * where for each i=1,...n, formula ret^Q_i is the result of calling
+ * getQuantifierEliminationDisjunct for q with the set of assertions
+ * {@code A^Q_{i-1}}. Similarly, if Q is forall, then let {@code A^Q_n} be
+ * {@code A ^ ret^Q_1 ^ ... ^ ret^Q_n }
+ * where ret^Q_i is the same as above. In either case, we have
+ * that ret^Q_j will eventually be true or false, for some finite j.
+ */
+ public Term getQuantifierEliminationDisjunct(Term q)
+ {
+ long termPointer = getQuantifierEliminationDisjunct(pointer, q.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long getQuantifierEliminationDisjunct(long pointer, long qPointer);
+
+ /**
+ * When using separation logic, this sets the location sort and the
+ * datatype sort to the given ones. This method should be invoked exactly
+ * once, before any separation logic constraints are provided.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param locSort The location sort of the heap
+ * @param dataSort The data sort of the heap
+ */
+ public void declareSepHeap(Sort locSort, Sort dataSort)
+ {
+ declareSepHeap(pointer, locSort.getPointer(), dataSort.getPointer());
+ }
+
+ private native void declareSepHeap(long pointer, long locSortPointer, long dataSortPointer);
+
+ /**
+ * When using separation logic, obtain the term for the heap.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return The term for the heap
+ */
+ public Term getValueSepHeap()
+ {
+ long termPointer = getValueSepHeap(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long getValueSepHeap(long pointer);
+
+ /**
+ * When using separation logic, obtain the term for nil.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return The term for nil
+ */
+ public Term getValueSepNil()
+ {
+ long termPointer = getValueSepNil(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long getValueSepNil(long pointer);
+
+ /**
+ * Declare a symbolic pool of terms with the given initial value.
+ * SMT-LIB:
+ * {@code
+ * ( declare-pool <symbol> <sort> ( <term>* ) )
+ * }
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param symbol The name of the pool
+ * @param sort The sort of the elements of the pool.
+ * @param initValue The initial value of the pool
+ */
+ public Term declarePool(String symbol, Sort sort, Term[] initValue)
+ {
+ long[] termPointers = Utils.getPointers(initValue);
+ long termPointer = declarePool(pointer, symbol, sort.getPointer(), termPointers);
+ return new Term(this, termPointer);
+ }
+
+ private native long declarePool(
+ long pointer, String symbol, long sortPointer, long[] termPointers);
+
+ /**
+ * Pop a level from the assertion stack.
+ * SMT-LIB:
+ * {@code
+ * ( pop <numeral> )
+ * }
+ * @throws CVC5ApiException
+ */
+ public void pop() throws CVC5ApiException
+ {
+ pop(1);
+ }
+
+ /**
+ * Pop (a) level(s) from the assertion stack.
+ * SMT-LIB:
+ * {@code
+ * ( pop <numeral> )
+ * }
+ * @param nscopes the number of levels to pop
+ * @throws CVC5ApiException
+ */
+ public void pop(int nscopes) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(nscopes, "nscopes");
+ pop(pointer, nscopes);
+ }
+
+ private native void pop(long pointer, int nscopes);
+
+ /**
+ * Get an interpolant
+ * SMT-LIB:
+ * {@code
+ * ( get-interpolant <conj> )
+ * }
+ * Requires 'produce-interpolants' to be set to a mode different from 'none'.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param conj the conjecture term
+ * @return a Term I such that {@code A->I} and {@code I->B} are valid, where
+ * A is the current set of assertions and B is given in the input by
+ * conj, or the null term if such a term cannot be found.
+ */
+ public Term getInterpolant(Term conj)
+ {
+ long interpolPtr = getInterpolant(pointer, conj.getPointer());
+ return new Term(this, interpolPtr);
+ }
+
+ private native long getInterpolant(long pointer, long conjPointer);
+
+ /**
+ * Get an interpolant
+ * SMT-LIB:
+ * {@code
+ * ( get-interpolant <conj> <g> )
+ * }
+ * Requires 'produce-interpolants' to be set to a mode different from 'none'.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param conj the conjecture term
+ * @param grammar the grammar for the interpolant I
+ * @return a Term I such that {@code A->I} and {@code I->B} are valid, where
+ * A is the current set of assertions and B is given in the input by
+ * conj, or the null term if such a term cannot be found.
+ */
+ public Term getInterpolant(Term conj, Grammar grammar)
+ {
+ long interpolPtr = getInterpolant(pointer, conj.getPointer(), grammar.getPointer());
+ return new Term(this, interpolPtr);
+ }
+
+ private native long getInterpolant(long pointer, long conjPointer, long grammarPointer);
+
+ /**
+ * Get the next interpolant. Can only be called immediately after a successful
+ * call to get-interpolant or get-interpolant-next. Is guaranteed to produce a
+ * syntactically different interpolant wrt the last returned interpolant if
+ * successful.
+ *
+ * SMT-LIB:
+ *
+ * \verbatim embed:rst:leading-asterisk
+ * .. code:: smtlib
+ *
+ * (get-interpolant-next)
+ *
+ * Requires to enable incremental mode, and option 'produce-interpolants' to be
+ * set to a mode different from 'none'.
+ * \endverbatim
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return a Term I such that {@code A->I} and {@code I->B} are valid,
+ * where A is the current set of assertions and B is given in the input
+ * by conj on the last call to getInterpolant, or the null term if such
+ * a term cannot be found.
+ */
+ public Term getInterpolantNext()
+ {
+ long interpolPtr = getInterpolantNext(pointer);
+ return new Term(this, interpolPtr);
+ }
+
+ private native long getInterpolantNext(long pointer);
+
+ /**
+ * Get an abduct.
+ * SMT-LIB:
+ * {@code
+ * ( get-abduct <conj> )
+ * }
+ * Requires enabling option 'produce-abducts'
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param conj the conjecture term
+ * @return a term C such that A^C is satisfiable, and A^~B^C is
+ * unsatisfiable, where A is the current set of assertions and B is
+ * given in the input by conj, or the null term if such a term cannot
+ * be found.
+ */
+ public Term getAbduct(Term conj)
+ {
+ long abdPtr = getAbduct(pointer, conj.getPointer());
+ return new Term(this, abdPtr);
+ }
+
+ private native long getAbduct(long pointer, long conjPointer);
+ /**
+ * Get an abduct.
+ * SMT-LIB:
+ * {@code
+ * ( get-abduct <conj> <g> )
+ * }
+ * Requires enabling option 'produce-abducts'
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param conj the conjecture term
+ * @param grammar the grammar for the abduct C
+ * @return a term C such that A^C is satisfiable, and A^~B^C is
+ * unsatisfiable, where A is the current set of assertions and B is
+ * given in the input by conj, or the null term if such a term cannot
+ * be found.
+ */
+ public Term getAbduct(Term conj, Grammar grammar)
+ {
+ long abdPtr = getAbduct(pointer, conj.getPointer(), grammar.getPointer());
+ return new Term(this, abdPtr);
+ }
+
+ private native long getAbduct(long pointer, long conjPointer, long grammarPointer);
+
+ /**
+ * Get the next abduct. Can only be called immediately after a successful
+ * call to get-abduct or get-abduct-next. Is guaranteed to produce a
+ * syntactically different abduct wrt the last returned abduct if successful.
+ * SMT-LIB:
+ * {@code
+ * ( get-abduct-next )
+ * }
+ * Requires enabling incremental mode and option 'produce-abducts'
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return a term C such that A^C is satisfiable, and A^~B^C is
+ * unsatisfiable, where A is the current set of assertions and B is
+ * given in the input by conj in the last call to getAbduct, or the
+ * null term if such a term cannot be found.
+ */
+ public Term getAbductNext()
+ {
+ long abdPtr = getAbductNext(pointer);
+ return new Term(this, abdPtr);
+ }
+
+ private native long getAbductNext(long pointer);
+
+ /**
+ * Block the current model. Can be called only if immediately preceded by a
+ * SAT or INVALID query.
+ * SMT-LIB:
+ * {@code
+ * ( block-model )
+ * }
+ * Requires enabling 'produce-models' option and setting 'block-models' option
+ * to a mode other than "none".
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ */
+ public void blockModel()
+ {
+ blockModel(pointer);
+ }
+
+ private native void blockModel(long pointer);
+
+ /**
+ * Block the current model values of (at least) the values in terms. Can be
+ * called only if immediately preceded by a SAT or NOT_ENTAILED query.
+ * SMT-LIB:
+ * {@code
+ * ( block-model-values ( <terms>+ ) )
+ * }
+ * Requires enabling 'produce-models' option.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ */
+ public void blockModelValues(Term[] terms)
+ {
+ long[] pointers = Utils.getPointers(terms);
+ blockModelValues(pointer, pointers);
+ }
+
+ private native void blockModelValues(long pointer, long[] termPointers);
+
+ /**
+ * Return a string that contains information about all instantiations made by
+ * the quantifiers module.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ */
+ public String getInstantiations()
+ {
+ return getInstantiations(pointer);
+ }
+
+ private native String getInstantiations(long pointer);
+
+ /**
+ * Push a level to the assertion stack.
+ * SMT-LIB:
+ * {@code
+ * ( push <numeral> )
+ * }
+ * @throws CVC5ApiException
+ */
+ public void push() throws CVC5ApiException
+ {
+ push(1);
+ }
+
+ /**
+ * Push (a) level(s) to the assertion stack.
+ * SMT-LIB:
+ * {@code
+ * ( push <numeral> )
+ * }
+ * @param nscopes the number of levels to push
+ * @throws CVC5ApiException
+ */
+ public void push(int nscopes) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(nscopes, "nscopes");
+ push(pointer, nscopes);
+ }
+
+ private native void push(long pointer, int nscopes);
+
+ /**
+ * Remove all assertions.
+ * SMT-LIB:
+ * {@code
+ * ( reset-assertions )
+ * }
+ */
+ public void resetAssertions()
+ {
+ resetAssertions(pointer);
+ }
+
+ private native void resetAssertions(long pointer);
+
+ /**
+ * Set info.
+ * SMT-LIB:
+ * {@code
+ * ( set-info <attribute> )
+ * }
+ * @param keyword the info flag
+ * @param value the value of the info flag
+ * @throws CVC5ApiException
+ */
+ public void setInfo(String keyword, String value) throws CVC5ApiException
+ {
+ setInfo(pointer, keyword, value);
+ }
+
+ private native void setInfo(long pointer, String keyword, String value) throws CVC5ApiException;
+
+ /**
+ * Set logic.
+ * SMT-LIB:
+ * {@code
+ * ( set-logic <symbol> )
+ * }
+ * @param logic the logic to set
+ * @throws CVC5ApiException
+ */
+ public void setLogic(String logic) throws CVC5ApiException
+ {
+ setLogic(pointer, logic);
+ }
+
+ private native void setLogic(long pointer, String logic) throws CVC5ApiException;
+
+ /**
+ * Set option.
+ * SMT-LIB:
+ * {@code
+ * ( set-option <option> )
+ * }
+ * @param option the option name
+ * @param value the option value
+ */
+ public void setOption(String option, String value)
+ {
+ setOption(pointer, option, value);
+ }
+
+ private native void setOption(long pointer, String option, String value);
+
+ /**
+ * Append \p symbol to the current list of universal variables.
+ * @param sort the sort of the universal variable
+ * @return the universal variable
+ */
+ public Term declareSygusVar(Sort sort)
+ {
+ return declareSygusVar(sort, "");
+ }
+ /**
+ * Append \p symbol to the current list of universal variables.
+ * SyGuS v2:
+ * {@code
+ * ( declare-var <symbol> <sort> )
+ * }
+ * @param sort the sort of the universal variable
+ * @param symbol the name of the universal variable
+ * @return the universal variable
+ */
+ public Term declareSygusVar(Sort sort, String symbol)
+ {
+ long termPointer = declareSygusVar(pointer, sort.getPointer(), symbol);
+ return new Term(this, termPointer);
+ }
+
+ private native long declareSygusVar(long pointer, long sortPointer, String symbol);
+
+ /**
+ * Create a Sygus grammar. The first non-terminal is treated as the starting
+ * non-terminal, so the order of non-terminals matters.
+ *
+ * @param boundVars the parameters to corresponding synth-fun/synth-inv
+ * @param ntSymbols the pre-declaration of the non-terminal symbols
+ * @return the grammar
+ */
+ public Grammar mkSygusGrammar(Term[] boundVars, Term[] ntSymbols)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long[] ntSymbolPointers = Utils.getPointers(ntSymbols);
+ long grammarPointer = mkSygusGrammar(pointer, boundVarPointers, ntSymbolPointers);
+ return new Grammar(this, grammarPointer);
+ }
+
+ private native long mkSygusGrammar(
+ long pointer, long[] boundVarPointers, long[] ntSymbolPointers);
+
+ /**
+ * Synthesize n-ary function.
+ * SyGuS v2:
+ * {@code
+ * ( synth-fun <symbol> ( <boundVars>* ) <sort> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @return the function
+ */
+ public Term synthFun(String symbol, Term[] boundVars, Sort sort)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer = synthFun(pointer, symbol, boundVarPointers, sort.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long synthFun(
+ long pointer, String symbol, long[] boundVarPointers, long sortPointer);
+
+ /**
+ * Synthesize n-ary function following specified syntactic constraints.
+ * SyGuS v2:
+ * {@code
+ * ( synth-fun <symbol> ( <boundVars>* ) <sort> <g> )
+ * }
+ * @param symbol the name of the function
+ * @param boundVars the parameters to this function
+ * @param sort the sort of the return value of this function
+ * @param grammar the syntactic constraints
+ * @return the function
+ */
+ public Term synthFun(String symbol, Term[] boundVars, Sort sort, Grammar grammar)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer =
+ synthFun(pointer, symbol, boundVarPointers, sort.getPointer(), grammar.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long synthFun(
+ long pointer, String symbol, long[] boundVarPointers, long sortPointer, long grammarPointer);
+
+ /**
+ * Synthesize invariant.
+ * SyGuS v2:
+ * {@code
+ * ( synth-inv <symbol> ( <boundVars>* ) )
+ * }
+ * @param symbol the name of the invariant
+ * @param boundVars the parameters to this invariant
+ * @return the invariant
+ */
+ public Term synthInv(String symbol, Term[] boundVars)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer = synthInv(pointer, symbol, boundVarPointers);
+ return new Term(this, termPointer);
+ }
+
+ private native long synthInv(long pointer, String symbol, long[] boundVarPointers);
+
+ /**
+ * Synthesize invariant following specified syntactic constraints.
+ * SyGuS v2:
+ * {@code
+ * ( synth-inv <symbol> ( <boundVars>* ) <g> )
+ * }
+ * @param symbol the name of the invariant
+ * @param boundVars the parameters to this invariant
+ * @param grammar the syntactic constraints
+ * @return the invariant
+ */
+ public Term synthInv(String symbol, Term[] boundVars, Grammar grammar)
+ {
+ long[] boundVarPointers = Utils.getPointers(boundVars);
+ long termPointer = synthInv(pointer, symbol, boundVarPointers, grammar.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long synthInv(
+ long pointer, String symbol, long[] boundVarPointers, long grammarPointer);
+
+ /**
+ * Add a forumla to the set of Sygus constraints.
+ * SyGuS v2:
+ * {@code
+ * ( constraint <term> )
+ * }
+ * @param term the formula to add as a constraint
+ */
+ public void addSygusConstraint(Term term)
+ {
+ addSygusConstraint(pointer, term.getPointer());
+ }
+
+ private native void addSygusConstraint(long pointer, long termPointer);
+
+ /**
+ * Add a forumla to the set of Sygus assumptions.
+ * SyGuS v2:
+ * {@code
+ * ( assume <term> )
+ * }
+ * @param term the formula to add as an assumption
+ */
+ public void addSygusAssume(Term term)
+ {
+ addSygusAssume(pointer, term.getPointer());
+ }
+
+ private native void addSygusAssume(long pointer, long termPointer);
+
+ /**
+ * Add a set of Sygus constraints to the current state that correspond to an
+ * invariant synthesis problem.
+ * SyGuS v2:
+ * {@code
+ * ( inv-constraint <inv> <pre> <trans> <post> )
+ * }
+ * @param inv the function-to-synthesize
+ * @param pre the pre-condition
+ * @param trans the transition relation
+ * @param post the post-condition
+ */
+ public void addSygusInvConstraint(Term inv, Term pre, Term trans, Term post)
+ {
+ addSygusInvConstraint(
+ pointer, inv.getPointer(), pre.getPointer(), trans.getPointer(), post.getPointer());
+ }
+
+ private native void addSygusInvConstraint(
+ long pointer, long invPointer, long prePointer, long transPointer, long postPointer);
+
+ /**
+ * Try to find a solution for the synthesis conjecture corresponding to the
+ * current list of functions-to-synthesize, universal variables and
+ * constraints.
+ * SyGuS v2:
+ * {@code
+ * ( check-synth )
+ * }
+ * @return the result of the check, which is "solution" if the check found a
+ * solution in which case solutions are available via
+ * getSynthSolutions, "no solution" if it was determined there is no
+ * solution, or "unknown" otherwise.
+ */
+ public SynthResult checkSynth()
+ {
+ long resultPointer = checkSynth(pointer);
+ return new SynthResult(this, resultPointer);
+ }
+
+ private native long checkSynth(long pointer);
+
+ /**
+ * Try to find a next solution for the synthesis conjecture corresponding to
+ * the current list of functions-to-synthesize, universal variables and
+ * constraints. Must be called immediately after a successful call to
+ * check-synth or check-synth-next. Requires incremental mode.
+ * SyGuS v2:
+ * {@code
+ * ( check-synth-next )
+ * }
+ * @return the result of the check, which is "solution" if the check found a
+ * solution in which case solutions are available via
+ * getSynthSolutions, "no solution" if it was determined there is no
+ * solution, or "unknown" otherwise.
+ */
+ public SynthResult checkSynthNext()
+ {
+ long resultPointer = checkSynthNext(pointer);
+ return new SynthResult(this, resultPointer);
+ }
+
+ private native long checkSynthNext(long pointer);
+
+ /**
+ * Get the synthesis solution of the given term. This method should be called
+ * immediately after the solver answers unsat for sygus input.
+ * @param term the term for which the synthesis solution is queried
+ * @return the synthesis solution of the given term
+ */
+ public Term getSynthSolution(Term term)
+ {
+ long termPointer = getSynthSolution(pointer, term.getPointer());
+ return new Term(this, termPointer);
+ }
+
+ private native long getSynthSolution(long pointer, long termPointer);
+
+ /**
+ * Get the synthesis solutions of the given terms. This method should be
+ * called immediately after the solver answers unsat for sygus input.
+ * @param terms the terms for which the synthesis solutions is queried
+ * @return the synthesis solutions of the given terms
+ */
+ public Term[] getSynthSolutions(Term[] terms)
+ {
+ long[] termPointers = Utils.getPointers(terms);
+ long[] retPointers = getSynthSolutions(pointer, termPointers);
+ return Utils.getTerms(this, retPointers);
+ }
+
+ private native long[] getSynthSolutions(long pointer, long[] termPointers);
+
+ /**
+ * Returns a snapshot of the current state of the statistic values of this
+ * solver. The returned object is completely decoupled from the solver and
+ * will not change when the solver is used again.
+ */
+ public Statistics getStatistics()
+ {
+ long statisticsPointer = getStatistics(pointer);
+ return new Statistics(this, statisticsPointer);
+ }
+
+ private native long getStatistics(long pointer);
+
+ /**
+ * @return null term
+ */
+ public Term getNullTerm()
+ {
+ long termPointer = getNullTerm(pointer);
+ return new Term(this, termPointer);
+ }
+
+ private native long getNullTerm(long pointer);
+
+ /**
+ * @return null result
+ */
+ public Result getNullResult()
+ {
+ long resultPointer = getNullResult(pointer);
+ return new Result(this, resultPointer);
+ }
+
+ private native long getNullResult(long pointer);
+
+ /**
+ * @return null synth result
+ */
+ public SynthResult getNullSynthResult()
+ {
+ long resultPointer = getNullSynthResult(pointer);
+ return new SynthResult(this, resultPointer);
+ }
+
+ private native long getNullSynthResult(long pointer);
+
+ /**
+ * @return null op
+ */
+ public Op getNullOp()
+ {
+ long opPointer = getNullOp(pointer);
+ return new Op(this, opPointer);
+ }
+
+ private native long getNullOp(long pointer);
+
+ /**
+ * @return null op
+ */
+ public DatatypeDecl getNullDatatypeDecl()
+ {
+ long declPointer = getNullDatatypeDecl(pointer);
+ return new DatatypeDecl(this, declPointer);
+ }
+
+ private native long getNullDatatypeDecl(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.List;
+
+public class Sort extends AbstractPointer implements Comparable<Sort>
+{
+ // region construction and destruction
+ Sort(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Comparison for structural equality.
+ * @param s the sort to compare to
+ * @return true if the sorts are equal
+ */
+ @Override
+ public boolean equals(Object s)
+ {
+ if (this == s)
+ return true;
+ if (s == null || getClass() != s.getClass())
+ return false;
+ Sort sort = (Sort) s;
+ if (this.pointer == sort.pointer)
+ {
+ return true;
+ }
+ return equals(pointer, sort.getPointer());
+ }
+
+ private native boolean equals(long pointer1, long pointer2);
+
+ /**
+ * Comparison for ordering on sorts.
+ *
+ * @param s the sort to compare to
+ * @return a negative integer, zero, or a positive integer as this sort
+ * is less than, equal to, or greater than the specified sort.
+ */
+ @Override
+ public int compareTo(Sort s)
+ {
+ return this.compareTo(pointer, s.getPointer());
+ }
+
+ private native int compareTo(long pointer1, long pointer2);
+
+ /**
+ * @return true if the sort has a symbol.
+ */
+ public boolean hasSymbol()
+ {
+ return hasSymbol(pointer);
+ }
+
+ private native boolean hasSymbol(long pointer);
+
+ /**
+ * Asserts hasSymbol().
+ * @return the raw symbol of the symbol.
+ */
+ public String getSymbol()
+ {
+ return getSymbol(pointer);
+ }
+
+ private native String getSymbol(long pointer);
+
+ /**
+ * @return true if this Sort is a null sort.
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * Is this a Boolean sort?
+ * @return true if the sort is a Boolean sort
+ */
+ public boolean isBoolean()
+ {
+ return isBoolean(pointer);
+ }
+
+ private native boolean isBoolean(long pointer);
+
+ /**
+ * Is this a integer sort?
+ * @return true if the sort is a integer sort
+ */
+ public boolean isInteger()
+ {
+ return isInteger(pointer);
+ }
+
+ private native boolean isInteger(long pointer);
+
+ /**
+ * Is this a real sort?
+ * @return true if the sort is a real sort
+ */
+ public boolean isReal()
+ {
+ return isReal(pointer);
+ }
+
+ private native boolean isReal(long pointer);
+
+ /**
+ * Is this a string sort?
+ * @return true if the sort is the string sort
+ */
+ public boolean isString()
+ {
+ return isString(pointer);
+ }
+
+ private native boolean isString(long pointer);
+
+ /**
+ * Is this a regexp sort?
+ * @return true if the sort is the regexp sort
+ */
+ public boolean isRegExp()
+ {
+ return isRegExp(pointer);
+ }
+
+ private native boolean isRegExp(long pointer);
+
+ /**
+ * Is this a rounding mode sort?
+ * @return true if the sort is the rounding mode sort
+ */
+ public boolean isRoundingMode()
+ {
+ return isRoundingMode(pointer);
+ }
+
+ private native boolean isRoundingMode(long pointer);
+
+ /**
+ * Is this a bit-vector sort?
+ * @return true if the sort is a bit-vector sort
+ */
+ public boolean isBitVector()
+ {
+ return isBitVector(pointer);
+ }
+
+ private native boolean isBitVector(long pointer);
+
+ /**
+ * Is this a floating-point sort?
+ * @return true if the sort is a floating-point sort
+ */
+ public boolean isFloatingPoint()
+ {
+ return isFloatingPoint(pointer);
+ }
+
+ private native boolean isFloatingPoint(long pointer);
+
+ /**
+ * Is this a datatype sort?
+ * @return true if the sort is a datatype sort
+ */
+ public boolean isDatatype()
+ {
+ return isDatatype(pointer);
+ }
+
+ private native boolean isDatatype(long pointer);
+
+ /**
+ * Is this a constructor sort?
+ * @return true if the sort is a constructor sort
+ */
+ public boolean isConstructor()
+ {
+ return isConstructor(pointer);
+ }
+
+ private native boolean isConstructor(long pointer);
+
+ /**
+ * Is this a selector sort?
+ * @return true if the sort is a selector sort
+ */
+ public boolean isSelector()
+ {
+ return isSelector(pointer);
+ }
+
+ private native boolean isSelector(long pointer);
+
+ /**
+ * Is this a tester sort?
+ * @return true if the sort is a tester sort
+ */
+ public boolean isTester()
+ {
+ return isTester(pointer);
+ }
+
+ private native boolean isTester(long pointer);
+
+ /**
+ * Is this a datatype updater sort?
+ * @return true if the sort is a datatype updater sort
+ */
+ public boolean isUpdater()
+ {
+ return isUpdater(pointer);
+ }
+
+ private native boolean isUpdater(long pointer);
+
+ /**
+ * Is this a function sort?
+ * @return true if the sort is a function sort
+ */
+ public boolean isFunction()
+ {
+ return isFunction(pointer);
+ }
+
+ private native boolean isFunction(long pointer);
+
+ /**
+ * Is this a predicate sort?
+ * That is, is this a function sort mapping to Boolean? All predicate
+ * sorts are also function sorts.
+ * @return true if the sort is a predicate sort
+ */
+ public boolean isPredicate()
+ {
+ return isPredicate(pointer);
+ }
+
+ private native boolean isPredicate(long pointer);
+
+ /**
+ * Is this a tuple sort?
+ * @return true if the sort is a tuple sort
+ */
+ public boolean isTuple()
+ {
+ return isTuple(pointer);
+ }
+
+ private native boolean isTuple(long pointer);
+
+ /**
+ * Is this a record sort?
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @return true if the sort is a record sort
+ */
+ public boolean isRecord()
+ {
+ return isRecord(pointer);
+ }
+
+ private native boolean isRecord(long pointer);
+
+ /**
+ * Is this an array sort?
+ * @return true if the sort is a array sort
+ */
+ public boolean isArray()
+ {
+ return isArray(pointer);
+ }
+
+ private native boolean isArray(long pointer);
+
+ /**
+ * Is this a Set sort?
+ * @return true if the sort is a Set sort
+ */
+ public boolean isSet()
+ {
+ return isSet(pointer);
+ }
+
+ private native boolean isSet(long pointer);
+
+ /**
+ * Is this a Bag sort?
+ * @return true if the sort is a Bag sort
+ */
+ public boolean isBag()
+ {
+ return isBag(pointer);
+ }
+
+ private native boolean isBag(long pointer);
+
+ /**
+ * Is this a Sequence sort?
+ * @return true if the sort is a Sequence sort
+ */
+ public boolean isSequence()
+ {
+ return isSequence(pointer);
+ }
+
+ private native boolean isSequence(long pointer);
+
+ /**
+ * Is this a sort kind?
+ * @return true if this is a sort kind
+ */
+ public boolean isUninterpretedSort()
+ {
+ return isUninterpretedSort(pointer);
+ }
+
+ private native boolean isUninterpretedSort(long pointer);
+
+ /**
+ * Is this an uninterpreted sort constructor kind?
+ *
+ * An uninterpreted sort constructor is an uninterpreted sort with arity
+ * > 0.
+ *
+ * @return true if this is a sort constructor kind
+ */
+ public boolean isUninterpretedSortConstructor()
+ {
+ return isUninterpretedSortConstructor(pointer);
+ }
+
+ private native boolean isUninterpretedSortConstructor(long pointer);
+
+ /**
+ * Is this an instantiated (parametric datatype or uninterpreted sort
+ * constructor) sort?
+ *
+ * An instantiated sort is a sort that has been constructed from
+ * instantiating a sort with sort arguments
+ * (see {@link Sort#instantiate(Sort[])}).
+ *
+ * @return true if this is an instantiated sort
+ */
+ public boolean isInstantiated()
+ {
+ return isInstantiated(pointer);
+ }
+
+ private native boolean isInstantiated(long pointer);
+
+ /**
+ * Get the associated uninterpreted sort constructor of an instantiated
+ * uninterpreted sort.
+ *
+ * @return the uninterpreted sort constructor sort
+ */
+ public Sort getUninterpretedSortConstructor()
+ {
+ long sortPointer = getUninterpretedSortConstructor(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getUninterpretedSortConstructor(long pointer);
+
+ /**
+ * @return the underlying datatype of a datatype sort
+ */
+ public Datatype getDatatype()
+ {
+ long datatypePointer = getDatatype(pointer);
+ return new Datatype(solver, datatypePointer);
+ }
+
+ private native long getDatatype(long pointer);
+
+ /**
+ * Instantiate a parameterized datatype sort or uninterpreted sort
+ * constructor sort.
+ *
+ * Create sorts parameter with Solver.mkParamSort().
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param params the list of sort parameters to instantiate with
+ * @return the instantiated sort
+ */
+ public Sort instantiate(List<Sort> params)
+ {
+ return instantiate(params.toArray(new Sort[0]));
+ }
+
+ /**
+ * Instantiate a parameterized datatype sort or uninterpreted sort
+ * constructor sort.
+ *
+ * Create sorts parameter with Solver.mkParamSort().
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param params the list of sort parameters to instantiate with
+ */
+ public Sort instantiate(Sort[] params)
+ {
+ long[] paramsPointers = Utils.getPointers(params);
+ long sortPointer = instantiate(pointer, paramsPointers);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long instantiate(long pointer, long[] paramsPointers);
+
+ /**
+ * Get the sorts used to instantiate the sort parameters of a parametric
+ * sort (parametric datatype or uninterpreted sort constructor sort,
+ * see {@link Sort#instantiate(Sort[])}).
+ *
+ * @return the sorts used to instantiate the sort parameters of a
+ * parametric sort
+ */
+ public Sort[] getInstantiatedParameters()
+ {
+ long[] pointers = getInstantiatedParameters(pointer);
+ return Utils.getSorts(solver, pointers);
+ }
+
+ private native long[] getInstantiatedParameters(long pointer);
+
+ /**
+ * Substitution of Sorts.
+ *
+ * Note that this replacement is applied during a pre-order traversal and
+ * only once to the sort. It is not run until fix point.
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param sort the subsort to be substituted within this sort.
+ * @param replacement the sort replacing the substituted subsort.
+ */
+ public Sort substitute(Sort sort, Sort replacement)
+ {
+ long sortPointer = substitute(pointer, sort.getPointer(), replacement.getPointer());
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long substitute(long pointer, long sortPointer, long replacementPointer);
+
+ /**
+ * Simultaneous substitution of Sorts.
+ *
+ * Note that this replacement is applied during a pre-order traversal and
+ * only once to the sort. It is not run until fix point. In the case that
+ * sorts contains duplicates, the replacement earliest in the list takes
+ * priority.
+ *
+ * For example,
+ * (Array A B).substitute({A, C}, {(Array C D), (Array A B)}) will
+ * return (Array (Array C D) B).
+ *
+ * @apiNote This method is experimental and may change in future versions.
+ *
+ * @param sorts the subsorts to be substituted within this sort.
+ * @param replacements the sort replacing the substituted subsorts.
+ */
+ public Sort substitute(Sort[] sorts, Sort[] replacements)
+ {
+ long[] sortPointers = Utils.getPointers(sorts);
+ long[] replacementPointers = Utils.getPointers(sorts);
+ long sortPointer = substitute(pointer, sortPointers, replacementPointers);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long substitute(long pointer, long[] sortPointers, long[] replacementPointers);
+
+ /**
+ * Output a string representation of this sort to a given stream.
+ * @param out the output stream
+ */
+ // TODO: do we need to support this?
+ // void toStream(std::ostream& out)
+
+ /**
+ * @return a string representation of this sort
+ */
+ protected native String toString(long pointer);
+
+ /* Constructor sort ------------------------------------------------------- */
+
+ /**
+ * @return the arity of a constructor sort
+ */
+ public int getConstructorArity()
+ {
+ return getConstructorArity(pointer);
+ }
+
+ private native int getConstructorArity(long pointer);
+
+ /**
+ * @return the domain sorts of a constructor sort
+ */
+ public Sort[] getConstructorDomainSorts()
+ {
+ long[] pointers = getConstructorDomainSorts(pointer);
+ return Utils.getSorts(solver, pointers);
+ }
+
+ private native long[] getConstructorDomainSorts(long pointer);
+
+ /**
+ * @return the codomain sort of a constructor sort
+ */
+ public Sort getConstructorCodomainSort()
+ {
+ long sortPointer = getConstructorCodomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getConstructorCodomainSort(long pointer);
+
+ /* Selector sort ------------------------------------------------------- */
+
+ /**
+ * @return the domain sort of a selector sort
+ */
+ public Sort getSelectorDomainSort()
+ {
+ long sortPointer = getSelectorDomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getSelectorDomainSort(long pointer);
+
+ /**
+ * @return the codomain sort of a selector sort
+ */
+ public Sort getSelectorCodomainSort()
+ {
+ long sortPointer = getSelectorCodomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getSelectorCodomainSort(long pointer);
+
+ /* Tester sort ------------------------------------------------------- */
+
+ /**
+ * @return the domain sort of a tester sort
+ */
+ public Sort getTesterDomainSort()
+ {
+ long sortPointer = getTesterDomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getTesterDomainSort(long pointer);
+
+ /**
+ * @return the codomain sort of a tester sort, which is the Boolean sort
+ */
+ public Sort getTesterCodomainSort()
+ {
+ long sortPointer = getTesterCodomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getTesterCodomainSort(long pointer);
+
+ /* Function sort ------------------------------------------------------- */
+
+ /**
+ * @return the arity of a function sort
+ */
+ public int getFunctionArity()
+ {
+ return getFunctionArity(pointer);
+ }
+
+ private native int getFunctionArity(long pointer);
+
+ /**
+ * @return the domain sorts of a function sort
+ */
+ public Sort[] getFunctionDomainSorts()
+ {
+ long[] pointers = getFunctionDomainSorts(pointer);
+ return Utils.getSorts(solver, pointers);
+ }
+
+ private native long[] getFunctionDomainSorts(long pointer);
+
+ /**
+ * @return the codomain sort of a function sort
+ */
+ public Sort getFunctionCodomainSort()
+ {
+ long sortPointer = getFunctionCodomainSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getFunctionCodomainSort(long pointer);
+
+ /* Array sort ---------------------------------------------------------- */
+
+ /**
+ * @return the array index sort of an array sort
+ */
+ public Sort getArrayIndexSort()
+ {
+ long sortPointer = getArrayIndexSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getArrayIndexSort(long pointer);
+
+ /**
+ * @return the array element sort of an array element sort
+ */
+ public Sort getArrayElementSort()
+ {
+ long sortPointer = getArrayElementSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getArrayElementSort(long pointer);
+
+ /* Set sort ------------------------------------------------------------ */
+
+ /**
+ * @return the element sort of a set sort
+ */
+ public Sort getSetElementSort()
+ {
+ long sortPointer = getSetElementSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getSetElementSort(long pointer);
+
+ /* Bag sort ------------------------------------------------------------ */
+
+ /**
+ * @return the element sort of a bag sort
+ */
+ public Sort getBagElementSort()
+ {
+ long sortPointer = getBagElementSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getBagElementSort(long pointer);
+
+ /* Sequence sort ------------------------------------------------------- */
+
+ /**
+ * @return the element sort of a sequence sort
+ */
+ public Sort getSequenceElementSort()
+ {
+ long sortPointer = getSequenceElementSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getSequenceElementSort(long pointer);
+
+ /* Sort constructor sort ----------------------------------------------- */
+
+ /**
+ * @return the arity of an uninterpreted sort constructor sort
+ */
+ public int getUninterpretedSortConstructorArity()
+ {
+ return getUninterpretedSortConstructorArity(pointer);
+ }
+
+ private native int getUninterpretedSortConstructorArity(long pointer);
+
+ /* Bit-vector sort ----------------------------------------------------- */
+
+ /**
+ * @return the bit-width of the bit-vector sort
+ */
+ public int getBitVectorSize()
+ {
+ return getBitVectorSize(pointer);
+ }
+
+ private native int getBitVectorSize(long pointer);
+
+ /* Floating-point sort ------------------------------------------------- */
+
+ /**
+ * @return the bit-width of the exponent of the floating-point sort
+ */
+ public int getFloatingPointExponentSize()
+ {
+ return getFloatingPointExponentSize(pointer);
+ }
+
+ private native int getFloatingPointExponentSize(long pointer);
+
+ /**
+ * @return the width of the significand of the floating-point sort
+ */
+ public int getFloatingPointSignificandSize()
+ {
+ return getFloatingPointSignificandSize(pointer);
+ }
+
+ private native int getFloatingPointSignificandSize(long pointer);
+
+ /* Datatype sort ------------------------------------------------------- */
+
+ /**
+ * @return the arity of a datatype sort
+ */
+ public int getDatatypeArity()
+ {
+ return getDatatypeArity(pointer);
+ }
+
+ private native int getDatatypeArity(long pointer);
+
+ /* Tuple sort ---------------------------------------------------------- */
+
+ /**
+ * @return the length of a tuple sort
+ */
+ public int getTupleLength()
+ {
+ return getTupleLength(pointer);
+ }
+
+ private native int getTupleLength(long pointer);
+
+ /**
+ * @return the element sorts of a tuple sort
+ */
+ public Sort[] getTupleSorts()
+ {
+ long[] pointers = getTupleSorts(pointer);
+ return Utils.getSorts(solver, pointers);
+ }
+
+ private native long[] getTupleSorts(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.Map;
+
+/**
+ * Represents a snapshot of a single statistic value.
+ * A value can be of type {@code long}, {@code double}, {@code String} or a histogram
+ * ({@code Map<String, Long>}).
+ * The value type can be queried (using {@code isInt()}, {@code isDouble()}, etc.) and
+ * the stored value can be accessed (using {@code getInt()}, {@code getDouble()}, etc.).
+ * It is possible to query whether this statistic is an internal statistic by
+ * {@code isInternal()} and whether its value is the default value by {@code isDefault()}.
+ */
+public class Stat extends AbstractPointer
+{
+ // region construction and destruction
+ Stat(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * @return a string representation of this Stat
+ */
+ protected native String toString(long pointer);
+
+ /**
+ * Is this value intended for internal use only?
+ * @return Whether this is an internal statistic.
+ */
+ public boolean isInternal()
+ {
+ return isInternal(pointer);
+ }
+
+ private native boolean isInternal(long pointer);
+
+ /**
+ * Does this value hold the default value?
+ * @return Whether this is a defaulted statistic.
+ */
+ public boolean isDefault()
+ {
+ return isDefault(pointer);
+ }
+
+ private native boolean isDefault(long pointer);
+
+ /**
+ * Is this value an integer?
+ * @return Whether the value is an integer.
+ */
+ public boolean isInt()
+ {
+ return isInt(pointer);
+ }
+
+ private native boolean isInt(long pointer);
+
+ /**
+ * Return the integer value.
+ * @return The integer value.
+ */
+ public long getInt()
+ {
+ return getInt(pointer);
+ }
+
+ private native long getInt(long pointer);
+
+ /**
+ * Is this value a double?
+ * @return Whether the value is a double.
+ */
+ public boolean isDouble()
+ {
+ return isDouble(pointer);
+ }
+
+ private native boolean isDouble(long pointer);
+
+ /**
+ * Return the double value.
+ * @return The double value.
+ */
+ public double getDouble()
+ {
+ return getDouble(pointer);
+ }
+
+ private native double getDouble(long pointer);
+
+ /**
+ * Is this value a string?
+ * @return Whether the value is a string.
+ */
+ public boolean isString()
+ {
+ return isString(pointer);
+ }
+
+ private native boolean isString(long pointer);
+
+ /**
+ * Return the string value.
+ * @return The string value.
+ */
+ public String getString()
+ {
+ return getString(pointer);
+ }
+
+ private native String getString(long pointer);
+
+ /**
+ * Is this value a histogram?
+ * @return Whether the value is a histogram.
+ */
+ public boolean isHistogram()
+ {
+ return isHistogram(pointer);
+ }
+
+ private native boolean isHistogram(long pointer);
+
+ /**
+ * Return the histogram value.
+ * @return The histogram value.
+ */
+ public Map<String, Long> getHistogram()
+ {
+ return getHistogram(pointer);
+ }
+
+ private native Map<String, Long> getHistogram(long pointer);
+};
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.util.AbstractMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+public class Statistics extends AbstractPointer implements Iterable<Map.Entry<String, Stat>>
+{
+ // region construction and destruction
+ Statistics(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * @return a string representation of this Statistics
+ */
+ protected native String toString(long pointer);
+
+ /**
+ * Retrieve the statistic with the given name.
+ * Asserts that a statistic with the given name actually exists and throws
+ * a `CVC5ApiRecoverableException` if it does not.
+ * @param name Name of the statistic.
+ * @return The statistic with the given name.
+ */
+ public Stat get(String name)
+ {
+ long statPointer = get(pointer, name);
+ return new Stat(solver, statPointer);
+ }
+
+ private native long get(long pointer, String name);
+
+ /**
+ * Begin iteration over the statistics values.
+ * By default, only entries that are public (non-internal) and have been set
+ * are visible while the others are skipped.
+ * @param internal If set to true, internal statistics are shown as well.
+ * @param defaulted If set to true, defaulted statistics are shown as well.
+ */
+
+ private native long getIteratorOpts(long pointer, boolean internal, boolean defaulted);
+ private native long getIterator(long pointer);
+
+ private native boolean hasNext(long pointer, long iteratorPointer);
+
+ private native Pair<String, Long> getNext(long pointer, long iteratorPointer)
+ throws CVC5ApiException;
+
+ private native long increment(long pointer, long iteratorPointer) throws CVC5ApiException;
+
+ private native void deleteIteratorPointer(long iteratorPointer);
+
+ public class ConstIterator implements Iterator<Map.Entry<String, Stat>>
+ {
+ private long iteratorPointer = 0;
+
+ public ConstIterator(boolean internal, boolean defaulted)
+ {
+ iteratorPointer = getIteratorOpts(pointer, internal, defaulted);
+ }
+ public ConstIterator()
+ {
+ iteratorPointer = getIterator(pointer);
+ }
+
+ @Override
+ public boolean hasNext()
+ {
+ return Statistics.this.hasNext(pointer, iteratorPointer);
+ }
+
+ @Override
+ public Map.Entry<String, Stat> next()
+ {
+ try
+ {
+ Pair<String, Long> pair = Statistics.this.getNext(pointer, iteratorPointer);
+ Stat stat = new Stat(solver, pair.second);
+ this.iteratorPointer = Statistics.this.increment(pointer, iteratorPointer);
+ return new AbstractMap.SimpleImmutableEntry<>(pair.first, stat);
+ }
+ catch (CVC5ApiException e)
+ {
+ throw new NoSuchElementException(e.getMessage());
+ }
+ }
+ }
+
+ public ConstIterator iterator(boolean internal, boolean defaulted)
+ {
+ return new ConstIterator(internal, defaulted);
+ }
+ @Override
+ public ConstIterator iterator()
+ {
+ return new ConstIterator();
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Andrew Reynolds
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class SynthResult extends AbstractPointer
+{
+ // region construction and destruction
+ SynthResult(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * @return true if SynthResult is empty, i.e., a nullary SynthResult, and not
+ * an actual result returned from a synthesis query.
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * @return true if the synthesis query has a solution.
+ */
+ public boolean hasSolution()
+ {
+ return hasSolution(pointer);
+ }
+
+ private native boolean hasSolution(long pointer);
+
+ /**
+ * @return true if the synthesis query has no solution. In this case, it was
+ * determined there was no solution.
+ */
+ public boolean hasNoSolution()
+ {
+ return hasNoSolution(pointer);
+ }
+
+ private native boolean hasNoSolution(long pointer);
+
+ /**
+ * @return true if the result of the synthesis query could not be determined.
+ */
+ public boolean isUnknown()
+ {
+ return isUnknown(pointer);
+ }
+
+ private native boolean isUnknown(long pointer);
+
+ /**
+ * @return a string representation of this result.
+ */
+ protected native String toString(long pointer);
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.math.BigInteger;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+public class Term extends AbstractPointer implements Comparable<Term>, Iterable<Term>
+{
+ // region construction and destruction
+ Term(Solver solver, long pointer)
+ {
+ super(solver, pointer);
+ }
+
+ protected native void deletePointer(long pointer);
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ // endregion
+
+ /**
+ * Syntactic equality operator.
+ * Return true if both terms are syntactically identical.
+ * Both terms must belong to the same solver object.
+ *
+ * @param t the term to compare to for equality
+ * @return true if the terms are equal
+ */
+ @Override
+ public boolean equals(Object t)
+ {
+ if (this == t)
+ return true;
+ if (t == null || getClass() != t.getClass())
+ return false;
+ Term term = (Term) t;
+ if (this.pointer == term.pointer)
+ {
+ return true;
+ }
+ return equals(pointer, term.getPointer());
+ }
+
+ private native boolean equals(long pointer1, long pointer2);
+
+ /**
+ * Comparison for ordering on terms.
+ *
+ * @param t the term to compare to
+ * @return a negative integer, zero, or a positive integer as this term
+ * is less than, equal to, or greater than the specified term.
+ */
+ @Override
+ public int compareTo(Term t)
+ {
+ return this.compareTo(pointer, t.getPointer());
+ }
+
+ private native int compareTo(long pointer1, long pointer2);
+
+ /**
+ * @return the number of children of this term
+ */
+ public int getNumChildren()
+ {
+ return getNumChildren(pointer);
+ }
+
+ private native int getNumChildren(long pointer);
+
+ /**
+ * Get the child term at a given index.
+ *
+ * @param index the index of the child term to return
+ * @return the child term with the given index
+ */
+ public Term getChild(int index) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(index, "index");
+ long termPointer = getChild(pointer, index);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getChild(long pointer, int index);
+
+ /**
+ * @return the id of this term
+ */
+ public long getId()
+ {
+ return getId(pointer);
+ }
+
+ private native long getId(long pointer);
+
+ /**
+ * @return the kind of this term
+ */
+ public Kind getKind() throws CVC5ApiException
+ {
+ int value = getKind(pointer);
+ return Kind.fromInt(value);
+ }
+
+ private native int getKind(long pointer);
+
+ /**
+ * @return the sort of this term
+ */
+ public Sort getSort()
+ {
+ long sortPointer = getSort(pointer);
+ return new Sort(solver, sortPointer);
+ }
+
+ private native long getSort(long pointer);
+
+ /**
+ * @return the result of replacing 'term' by 'replacement' in this term
+ *
+ * Note that this replacement is applied during a pre-order traversal and
+ * only once to the term. It is not run until fix point.
+ */
+ public Term substitute(Term term, Term replacement)
+ {
+ long termPointer = substitute(pointer, term.getPointer(), replacement.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long substitute(long pointer, long termPointer, long replacementPointer);
+
+ /**
+ * @return the result of simultaneously replacing 'terms' by 'replacements'
+ * in this term
+ *
+ * Note that this replacement is applied during a pre-order traversal and
+ * only once to the term. It is not run until fix point. In the case that
+ * terms contains duplicates, the replacement earliest in the vector takes
+ * priority. For example, calling substitute on f(x,y) with
+ * terms = { x, z }, replacements = { g(z), w }
+ * results in the term f(g(z),y).
+ */
+ public Term substitute(List<Term> terms, List<Term> replacements)
+ {
+ return substitute(terms.toArray(new Term[0]), replacements.toArray(new Term[0]));
+ }
+
+ /**
+ * @return the result of simultaneously replacing 'terms' by 'replacements'
+ * in this term
+ */
+ public Term substitute(Term[] terms, Term[] replacements)
+ {
+ long[] termPointers = new long[terms.length];
+ for (int i = 0; i < termPointers.length; i++)
+ {
+ termPointers[i] = terms[i].getPointer();
+ }
+ long[] replacementPointers = new long[replacements.length];
+ for (int i = 0; i < replacements.length; i++)
+ {
+ replacementPointers[i] = replacements[i].getPointer();
+ }
+
+ long termPointer = substitute(pointer, termPointers, replacementPointers);
+ return new Term(solver, termPointer);
+ }
+
+ private native long substitute(long pointer, long[] termPointers, long[] replacementPointers);
+
+ /**
+ * @return true iff this term has an operator
+ */
+ public boolean hasOp()
+ {
+ return hasOp(pointer);
+ }
+
+ private native boolean hasOp(long pointer);
+
+ /**
+ * @return the Op used to create this term
+ * @apiNote This is safe to call when hasOp() returns true.
+ */
+ public Op getOp()
+ {
+ long opPointer = getOp(pointer);
+ return new Op(solver, opPointer);
+ }
+
+ private native long getOp(long pointer);
+
+ /**
+ * @return true if the term has a symbol.
+ */
+ public boolean hasSymbol()
+ {
+ return hasSymbol(pointer);
+ }
+
+ private native boolean hasSymbol(long pointer);
+
+ /**
+ * Asserts hasSymbol().
+ * @return the raw symbol of the term.
+ */
+ public String getSymbol()
+ {
+ return getSymbol(pointer);
+ }
+
+ private native String getSymbol(long pointer);
+
+ /**
+ * @return true if this Term is a null term
+ */
+ public boolean isNull()
+ {
+ return isNull(pointer);
+ }
+
+ private native boolean isNull(long pointer);
+
+ /**
+ * Boolean negation.
+ *
+ * @return the Boolean negation of this term
+ */
+ public Term notTerm()
+ {
+ long termPointer = notTerm(pointer);
+ return new Term(solver, termPointer);
+ }
+
+ private native long notTerm(long pointer);
+
+ /**
+ * Boolean and.
+ *
+ * @param t a Boolean term
+ * @return the conjunction of this term and the given term
+ */
+ public Term andTerm(Term t)
+ {
+ long termPointer = andTerm(pointer, t.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long andTerm(long pointer, long termPointer);
+
+ /**
+ * Boolean or.
+ *
+ * @param t a Boolean term
+ * @return the disjunction of this term and the given term
+ */
+ public Term orTerm(Term t)
+ {
+ long termPointer = orTerm(pointer, t.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long orTerm(long pointer, long termPointer);
+
+ /**
+ * Boolean exclusive or.
+ *
+ * @param t a Boolean term
+ * @return the exclusive disjunction of this term and the given term
+ */
+ public Term xorTerm(Term t)
+ {
+ long termPointer = xorTerm(pointer, t.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long xorTerm(long pointer, long termPointer);
+
+ /**
+ * Equality.
+ *
+ * @param t a Boolean term
+ * @return the Boolean equivalence of this term and the given term
+ */
+ public Term eqTerm(Term t)
+ {
+ long termPointer = eqTerm(pointer, t.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long eqTerm(long pointer, long termPointer);
+
+ /**
+ * Boolean implication.
+ *
+ * @param t a Boolean term
+ * @return the implication of this term and the given term
+ */
+ public Term impTerm(Term t)
+ {
+ long termPointer = impTerm(pointer, t.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long impTerm(long pointer, long termPointer);
+
+ /**
+ * If-then-else with this term as the Boolean condition.
+ *
+ * @param thenTerm the 'then' term
+ * @param elseTerm the 'else' term
+ * @return the if-then-else term with this term as the Boolean condition
+ */
+ public Term iteTerm(Term thenTerm, Term elseTerm)
+ {
+ long termPointer = iteTerm(pointer, thenTerm.getPointer(), elseTerm.getPointer());
+ return new Term(solver, termPointer);
+ }
+
+ private native long iteTerm(long pointer, long thenPointer, long elsePointer);
+
+ /**
+ * @return a string representation of this term.
+ */
+ protected native String toString(long pointer);
+
+ /**
+ * Get integer or real value sign. Must be called on integer or real values,
+ * or otherwise an exception is thrown.
+ * @return 0 if this term is zero, -1 if this term is a negative real or
+ * integer value, 1 if this term is a positive real or integer value.
+ */
+ public int getRealOrIntegerValueSign()
+ {
+ return getRealOrIntegerValueSign(pointer);
+ }
+
+ private native int getRealOrIntegerValueSign(long pointer);
+
+ /**
+ * @return true if the term is an integer value.
+ */
+ public boolean isIntegerValue()
+ {
+ return isIntegerValue(pointer);
+ }
+
+ private native boolean isIntegerValue(long pointer);
+
+ /**
+ * Asserts isIntegerValue().
+ * @return the integer represented by this term.
+ */
+ public BigInteger getIntegerValue()
+ {
+ return new BigInteger(getIntegerValue(pointer));
+ }
+
+ private native String getIntegerValue(long pointer);
+
+ /**
+ * @return true if the term is a string constant.
+ */
+ public boolean isStringValue()
+ {
+ return isStringValue(pointer);
+ }
+
+ private native boolean isStringValue(long pointer);
+
+ /**
+ * @return the stored string constant.
+ *
+ * Asserts isString().
+ *
+ * @apiNote This method is not to be confused with toString() which returns
+ * the term in some string representation, whatever data it may hold.
+ */
+ public String getStringValue()
+ {
+ return getStringValue(pointer);
+ }
+
+ private native String getStringValue(long pointer);
+
+ /**
+ * @return true if the term is a rational value.
+ */
+ public boolean isRealValue()
+ {
+ return isRealValue(pointer);
+ }
+
+ private native boolean isRealValue(long pointer);
+
+ /**
+ * Asserts isRealValue().
+ * @return the representation of a rational value as a pair of its numerator
+ * and denominator.
+ */
+ public Pair<BigInteger, BigInteger> getRealValue()
+ {
+ String rational = getRealValue(pointer);
+ return Utils.getRational(rational);
+ }
+
+ private native String getRealValue(long pointer);
+
+ /**
+ * @return true if the term is a constant array.
+ */
+ public boolean isConstArray()
+ {
+ return isConstArray(pointer);
+ }
+
+ private native boolean isConstArray(long pointer);
+
+ /**
+ * Asserts isConstArray().
+ * @return the base (element stored at all indices) of a constant array
+ */
+ public Term getConstArrayBase()
+ {
+ long termPointer = getConstArrayBase(pointer);
+ return new Term(solver, termPointer);
+ }
+
+ private native long getConstArrayBase(long pointer);
+
+ /**
+ * @return true if the term is a Boolean value.
+ */
+ public boolean isBooleanValue()
+ {
+ return isBooleanValue(pointer);
+ }
+
+ private native boolean isBooleanValue(long pointer);
+ /**
+ * Asserts isBooleanValue().
+ * @return the representation of a Boolean value as a native Boolean value.
+ */
+ public boolean getBooleanValue()
+ {
+ return getBooleanValue(pointer);
+ }
+
+ private native boolean getBooleanValue(long pointer);
+
+ /**
+ * @return true if the term is a bit-vector value.
+ */
+ public boolean isBitVectorValue()
+ {
+ return isBitVectorValue(pointer);
+ }
+
+ private native boolean isBitVectorValue(long pointer);
+
+ /**
+ * Asserts isBitVectorValue().
+ * @return the representation of a bit-vector value in bit string representation.
+ */
+ public String getBitVectorValue() throws CVC5ApiException
+ {
+ return getBitVectorValue(2);
+ }
+
+ /**
+ * Asserts isBitVectorValue().
+ * @return the representation of a bit-vector value in string representation.
+ * Supported bases are 2 (bit string), 10 (decimal string) or 16 (hexadecimal
+ * string).
+ */
+ public String getBitVectorValue(int base) throws CVC5ApiException
+ {
+ Utils.validateUnsigned(base, "base");
+ return getBitVectorValue(pointer, base);
+ }
+
+ private native String getBitVectorValue(long pointer, int base);
+
+ /**
+ * @return true if the term is an uninterpreted sort value.
+ */
+ public boolean isUninterpretedSortValue()
+ {
+ return isUninterpretedSortValue(pointer);
+ }
+
+ private native boolean isUninterpretedSortValue(long pointer);
+
+ /**
+ * Asserts isUninterpretedSortValue().
+ * @return the representation of an uninterpreted sort value as a string.
+ */
+ public String getUninterpretedSortValue()
+ {
+ return getUninterpretedSortValue(pointer);
+ }
+
+ private native String getUninterpretedSortValue(long pointer);
+
+ /**
+ * @return true if the term is a floating-point rounding mode value.
+ */
+ public boolean isRoundingModeValue()
+ {
+ return isRoundingModeValue(pointer);
+ }
+
+ private native boolean isRoundingModeValue(long pointer);
+
+ /**
+ * Asserts isRoundingModeValue().
+ * @return the floating-point rounding mode value held by the term.
+ */
+ public RoundingMode getRoundingModeValue() throws CVC5ApiException
+ {
+ int value = getRoundingModeValue(pointer);
+ return RoundingMode.fromInt(value);
+ }
+
+ private native int getRoundingModeValue(long pointer);
+
+ /**
+ * @return true if the term is a tuple value.
+ */
+ public boolean isTupleValue()
+ {
+ return isTupleValue(pointer);
+ }
+
+ private native boolean isTupleValue(long pointer);
+
+ /**
+ * Asserts isTupleValue().
+ * @return the representation of a tuple value as a vector of terms.
+ */
+ public Term[] getTupleValue()
+ {
+ long[] termPointers = getTupleValue(pointer);
+ return Utils.getTerms(solver, termPointers);
+ }
+
+ private native long[] getTupleValue(long pointer);
+
+ /**
+ * @return true if the term is the floating-point value for positive zero.
+ */
+ public boolean isFloatingPointPosZero()
+ {
+ return isFloatingPointPosZero(pointer);
+ }
+
+ private native boolean isFloatingPointPosZero(long pointer);
+ /**
+ * @return true if the term is the floating-point value for negative zero.
+ */
+ public boolean isFloatingPointNegZero()
+ {
+ return isFloatingPointNegZero(pointer);
+ }
+
+ private native boolean isFloatingPointNegZero(long pointer);
+ /**
+ * @return true if the term is the floating-point value for positive
+ * infinity.
+ */
+ public boolean isFloatingPointPosInf()
+ {
+ return isFloatingPointPosInf(pointer);
+ }
+
+ private native boolean isFloatingPointPosInf(long pointer);
+ /**
+ * @return true if the term is the floating-point value for negative
+ * infinity.
+ */
+ public boolean isFloatingPointNegInf()
+ {
+ return isFloatingPointNegInf(pointer);
+ }
+
+ private native boolean isFloatingPointNegInf(long pointer);
+ /**
+ * @return true if the term is the floating-point value for not a number.
+ */
+ public boolean isFloatingPointNaN()
+ {
+ return isFloatingPointNaN(pointer);
+ }
+
+ private native boolean isFloatingPointNaN(long pointer);
+ /**
+ * @return true if the term is a floating-point value.
+ */
+ public boolean isFloatingPointValue()
+ {
+ return isFloatingPointValue(pointer);
+ }
+
+ private native boolean isFloatingPointValue(long pointer);
+ /**
+ * Asserts isFloatingPointValue().
+ * @return the representation of a floating-point value as a tuple of the
+ * exponent width, the significand width and a bit-vector value.
+ */
+ public Triplet<Long, Long, Term> getFloatingPointValue()
+ {
+ Triplet<Long, Long, Long> triplet = getFloatingPointValue(pointer);
+ return new Triplet<>(triplet.first, triplet.second, new Term(solver, triplet.third));
+ }
+
+ private native Triplet<Long, Long, Long> getFloatingPointValue(long pointer);
+
+ /**
+ * @return true if the term is a set value.
+ */
+ public boolean isSetValue()
+ {
+ return isSetValue(pointer);
+ }
+
+ private native boolean isSetValue(long pointer);
+ /**
+ * Asserts isSetValue().
+ * @return the representation of a set value as a set of terms.
+ */
+ public Set<Term> getSetValue()
+ {
+ long[] termPointers = getSetValue(pointer);
+ Term[] terms = Utils.getTerms(solver, termPointers);
+ return new HashSet<Term>(Arrays.asList(terms));
+ }
+
+ private native long[] getSetValue(long pointer);
+
+ /**
+ * @return true if the term is a sequence value.
+ */
+ public boolean isSequenceValue()
+ {
+ return isSequenceValue(pointer);
+ }
+
+ private native boolean isSequenceValue(long pointer);
+
+ /**
+ * Asserts isSequenceValue().
+ * @apiNote It is usually necessary for sequences to call
+ * `Solver::simplify()` to turn a sequence that is constructed by,
+ * e.g., concatenation of unit sequences, into a sequence value.
+ * @return the representation of a sequence value as a vector of terms.
+ */
+ public Term[] getSequenceValue()
+ {
+ long[] termPointers = getSequenceValue(pointer);
+ return Utils.getTerms(solver, termPointers);
+ }
+
+ private native long[] getSequenceValue(long pointer);
+
+ /**
+ * @return true if the term is a cardinality constraint
+ */
+ public boolean isCardinalityConstraint()
+ {
+ return isCardinalityConstraint(pointer);
+ }
+
+ private native boolean isCardinalityConstraint(long pointer);
+
+ /**
+ * Asserts isCardinalityConstraint().
+ * @return the sort the cardinality constraint is for and its upper bound.
+ */
+ public Pair<Sort, BigInteger> getCardinalityConstraint()
+ {
+ Pair<Long, BigInteger> pair = getCardinalityConstraint(pointer);
+ Sort sort = new Sort(solver, pair.first);
+ return new Pair<Sort, BigInteger>(sort, pair.second);
+ }
+
+ private native Pair<Long, BigInteger> getCardinalityConstraint(long pointer);
+
+ public class ConstIterator implements Iterator<Term>
+ {
+ private int currentIndex;
+ private int size;
+
+ public ConstIterator()
+ {
+ currentIndex = -1;
+ size = getNumChildren();
+ }
+
+ @Override
+ public boolean hasNext()
+ {
+ return currentIndex < size - 1;
+ }
+
+ @Override
+ public Term next()
+ {
+ if (currentIndex >= size - 1)
+ {
+ throw new NoSuchElementException();
+ }
+ currentIndex++;
+ try
+ {
+ return getChild(currentIndex);
+ }
+ catch (CVC5ApiException e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+ }
+
+ @Override
+ public Iterator<Term> iterator()
+ {
+ return new ConstIterator();
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+public class Triplet<A, B, C>
+{
+ public A first;
+ public B second;
+ public C third;
+ public Triplet(A first, B second, C third)
+ {
+ this.first = first;
+ this.second = second;
+ this.third = third;
+ }
+
+ @Override
+ public boolean equals(Object object)
+ {
+ if (this == object)
+ return true;
+ if (object == null || getClass() != object.getClass())
+ return false;
+
+ return this.first.equals(((Triplet<?, ?, ?>) object).first)
+ && this.second.equals(((Triplet<?, ?, ?>) object).second)
+ && this.third.equals(((Triplet<?, ?, ?>) object).third);
+ }
+}
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Mudathir Mohamed
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The cvc5 java API.
+ */
+
+package io.github.cvc5;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Utils
+{
+ static
+ {
+ loadLibraries();
+ }
+
+ /**
+ * load cvc5 jni library
+ */
+ public static void loadLibraries()
+ {
+ System.loadLibrary("cvc5jni");
+ }
+
+ /**
+ * return sorts array from array of pointers
+ */
+ public static Sort[] getSorts(Solver solver, long[] pointers)
+ {
+ Sort[] sorts = new Sort[pointers.length];
+ for (int i = 0; i < pointers.length; i++)
+ {
+ sorts[i] = new Sort(solver, pointers[i]);
+ }
+ return sorts;
+ }
+
+ /**
+ * return terms array from array of pointers
+ */
+ public static Term[] getTerms(Solver solver, long[] pointers)
+ {
+ Term[] terms = new Term[pointers.length];
+ for (int i = 0; i < pointers.length; i++)
+ {
+ terms[i] = new Term(solver, pointers[i]);
+ }
+ return terms;
+ }
+
+ /**
+ * get pointers from one dimensional array
+ */
+ public static long[] getPointers(IPointer[] objects)
+ {
+ long[] pointers = new long[objects.length];
+ for (int i = 0; i < pointers.length; i++)
+ {
+ pointers[i] = objects[i].getPointer();
+ }
+ return pointers;
+ }
+
+ /**
+ * get pointers from two dimensional matrix
+ */
+ public static long[][] getPointers(IPointer[][] objects)
+ {
+ long[][] pointers = new long[objects.length][];
+ for (int i = 0; i < pointers.length; i++)
+ {
+ pointers[i] = new long[objects[i].length];
+ for (int j = 0; j < objects[i].length; j++)
+ {
+ pointers[i][j] = objects[i][j].getPointer();
+ }
+ }
+ return pointers;
+ }
+
+ public static void validateUnsigned(int integer, String name) throws CVC5ApiException
+ {
+ if (integer < 0)
+ {
+ throw new CVC5ApiException("Expected " + name + " '" + integer + "' to be non negative.");
+ }
+ }
+
+ public static void validateUnsigned(long integer, String name) throws CVC5ApiException
+ {
+ if (integer < 0)
+ {
+ throw new CVC5ApiException("Expected " + name + " '" + integer + "' to be non negative.");
+ }
+ }
+
+ public static void validateUnsigned(int[] integers, String name) throws CVC5ApiException
+ {
+ for (int i = 0; i < integers.length; i++)
+ {
+ if (integers[i] < 0)
+ {
+ throw new CVC5ApiException(
+ "Expected " + name + "[" + i + "] '" + integers[i] + "' to be non negative.");
+ }
+ }
+ }
+
+ public static void validateUnsigned(long[] integers, String name) throws CVC5ApiException
+ {
+ for (int i = 0; i < integers.length; i++)
+ {
+ if (integers[i] < 0)
+ {
+ throw new CVC5ApiException(
+ "Expected " + name + "[" + i + "] '" + integers[i] + "' to be non negative.");
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <K> Pair<K, Long>[] getPairs(Pair<K, ? extends AbstractPointer>[] abstractPointers)
+ {
+ Pair<K, Long>[] pointers = new Pair[abstractPointers.length];
+ for (int i = 0; i < pointers.length; i++)
+ {
+ pointers[i] = new Pair<>(abstractPointers[i].first, abstractPointers[i].second.getPointer());
+ }
+ return pointers;
+ }
+
+ /**
+ Convert a rational string a/b to a pair of BigIntegers
+ */
+ public static Pair<BigInteger, BigInteger> getRational(String rational)
+ {
+ if (rational.contains("/"))
+ {
+ String[] pair = rational.split("/");
+ return new Pair<>(new BigInteger(pair[0]), new BigInteger(pair[1]));
+ }
+ return new Pair<>(new BigInteger(rational), new BigInteger("1"));
+ }
+
+ /**
+ Convert a pair of BigIntegers to a rational string a/b
+ */
+ public static String getRational(Pair<BigInteger, BigInteger> pair)
+ {
+ return pair.first.toString() + "/" + pair.second.toString();
+ }
+}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-abstract class AbstractPointer implements IPointer
-{
- protected final Solver solver;
- protected long pointer;
-
- public long getPointer()
- {
- return pointer;
- }
-
- protected abstract void deletePointer(long pointer);
-
- void deletePointer()
- {
- if (pointer != 0)
- {
- deletePointer(pointer);
- }
- pointer = 0;
- }
-
- public Solver getSolver()
- {
- return solver;
- }
-
- @Override
- public String toString()
- {
- return toString(pointer);
- }
-
- abstract protected String toString(long pointer);
-
- AbstractPointer(Solver solver, long pointer)
- {
- this.solver = solver;
- this.pointer = pointer;
- solver.addAbstractPointer(this);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class CVC5ApiException extends Exception
-{
- public CVC5ApiException(String message)
- {
- super(message);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Gereon Kremer, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class CVC5ApiOptionException extends CVC5ApiRecoverableException
-{
- public CVC5ApiOptionException(String message)
- {
- super(message);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class CVC5ApiRecoverableException extends CVC5ApiException
-{
- public CVC5ApiRecoverableException(String message)
- {
- super(message);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-public class Datatype extends AbstractPointer implements Iterable<DatatypeConstructor>
-{
- // region construction and destruction
- Datatype(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Get the datatype constructor at a given index.
- * @param idx the index of the datatype constructor to return
- * @return the datatype constructor with the given index
- */
- public DatatypeConstructor getConstructor(int idx)
- {
- long constructorPointer = getConstructor(pointer, idx);
- return new DatatypeConstructor(solver, constructorPointer);
- }
-
- private native long getConstructor(long pointer, int index);
-
- /**
- * Get the datatype constructor with the given name.
- * This is a linear search through the constructors, so in case of multiple,
- * similarly-named constructors, the first is returned.
- * @param name the name of the datatype constructor
- * @return the datatype constructor with the given name
- */
- public DatatypeConstructor getConstructor(String name)
- {
- long constructorPointer = getConstructor(pointer, name);
- return new DatatypeConstructor(solver, constructorPointer);
- }
-
- private native long getConstructor(long pointer, String name);
-
- /**
- * Get a term representing the datatype constructor with the given name.
- * This is a linear search through the constructors, so in case of multiple,
- * similarly-named constructors, the
- * first is returned.
- * @param name the name of the datatype constructor
- * @return a Term representing the datatype constructor with the given name
- */
- public Term getConstructorTerm(String name)
- {
- long termPointer = getConstructorTerm(pointer, name);
- return new Term(solver, termPointer);
- }
-
- private native long getConstructorTerm(long pointer, String name);
-
- /**
- * Get the datatype constructor with the given name.
- * This is a linear search through the constructors and their selectors, so
- * in case of multiple, similarly-named selectors, the first is returned.
- * @param name the name of the datatype selector
- * @return the datatype selector with the given name
- */
- public DatatypeSelector getSelector(String name)
- {
- long selectorPointer = getSelector(pointer, name);
- return new DatatypeSelector(solver, selectorPointer);
- }
-
- private native long getSelector(long pointer, String name);
-
- /** @return the name of this Datatype. */
- public String getName()
- {
- return getName(pointer);
- }
-
- private native String getName(long pointer);
-
- /** @return the number of constructors for this Datatype. */
- public int getNumConstructors()
- {
- return getNumConstructors(pointer);
- }
-
- private native int getNumConstructors(long pointer);
-
- /**
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return the parameters of this datatype, if it is parametric. An exception
- * is thrown if this datatype is not parametric.
- */
- public Sort[] getParameters()
- {
- long[] sortPointers = getParameters(pointer);
- Sort[] sorts = Utils.getSorts(solver, sortPointers);
- return sorts;
- }
-
- private native long[] getParameters(long pointer);
-
- /**
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return true if this datatype is parametric
- */
- public boolean isParametric()
- {
- return isParametric(pointer);
- }
-
- private native boolean isParametric(long pointer);
-
- /** @return true if this datatype corresponds to a co-datatype */
- public boolean isCodatatype()
- {
- return isCodatatype(pointer);
- }
-
- private native boolean isCodatatype(long pointer);
-
- /** @return true if this datatype corresponds to a tuple */
- public boolean isTuple()
- {
- return isTuple(pointer);
- }
-
- private native boolean isTuple(long pointer);
-
- /**
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return true if this datatype corresponds to a record
- */
- public boolean isRecord()
- {
- return isRecord(pointer);
- }
-
- private native boolean isRecord(long pointer);
-
- /** @return true if this datatype is finite */
- public boolean isFinite()
- {
- return isFinite(pointer);
- }
-
- private native boolean isFinite(long pointer);
-
- /**
- * Is this datatype well-founded? If this datatype is not a codatatype,
- * this returns false if there are no values of this datatype that are of
- * finite size.
- *
- * @return true if this datatype is well-founded
- */
- public boolean isWellFounded()
- {
- return isWellFounded(pointer);
- }
-
- private native boolean isWellFounded(long pointer);
-
- /**
- * @return true if this Datatype is a null object
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return a string representation of this datatype
- */
- protected native String toString(long pointer);
-
- public class ConstIterator implements Iterator<DatatypeConstructor>
- {
- private int currentIndex;
- private int size;
-
- public ConstIterator()
- {
- currentIndex = -1;
- size = getNumConstructors();
- }
-
- @Override
- public boolean hasNext()
- {
- return currentIndex < size - 1;
- }
-
- @Override
- public DatatypeConstructor next()
- {
- if (currentIndex >= size - 1)
- {
- throw new NoSuchElementException();
- }
- currentIndex++;
-
- return getConstructor(currentIndex);
- }
- }
-
- @Override
- public Iterator<DatatypeConstructor> iterator()
- {
- return new ConstIterator();
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-public class DatatypeConstructor extends AbstractPointer implements Iterable<DatatypeSelector>
-{
- // region construction and destruction
- DatatypeConstructor(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /** @return the name of this Datatype constructor. */
- public String getName()
- {
- return getName(pointer);
- }
-
- private native String getName(long pointer);
-
- /**
- * Get the constructor operator of this datatype constructor.
- * @return the constructor term
- */
- public Term getConstructorTerm()
- {
- long termPointer = getConstructorTerm(pointer);
- return new Term(solver, termPointer);
- }
-
- private native long getConstructorTerm(long pointer);
-
- /**
- * Get the constructor operator of this datatype constructor whose return
- * type is retSort. This method is intended to be used on constructors of
- * parametric datatypes and can be seen as returning the constructor
- * term that has been explicitly cast to the given sort.
- *
- * This method is required for constructors of parametric datatypes whose
- * return type cannot be determined by type inference. For example, given:
- * (declare-datatype List (par (T) ((nil) (cons (head T) (tail (List T))))))
- * The type of nil terms need to be provided by the user. In SMT version 2.6,
- * this is done via the syntax for qualified identifiers:
- * (as nil (List Int))
- * This method is equivalent of applying the above, where this
- * DatatypeConstructor is the one corresponding to nil, and retSort is
- * (List Int).
- *
- * Furthermore note that the returned constructor term t is an operator,
- * while Solver::mkTerm(APPLY_CONSTRUCTOR, t) is used to construct the above
- * (nullary) application of nil.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param retSort the desired return sort of the constructor
- * @return the constructor term
- */
- public Term getInstantiatedConstructorTerm(Sort retSort)
- {
- long termPointer = getInstantiatedConstructorTerm(pointer, retSort.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long getInstantiatedConstructorTerm(long pointer, long retSortPointer);
-
- /**
- * Get the tester operator of this datatype constructor.
- * @return the tester operator
- */
- public Term getTesterTerm()
- {
- long termPointer = getTesterTerm(pointer);
- return new Term(solver, termPointer);
- }
- private native long getTesterTerm(long pointer);
-
- /**
- * @return the number of selectors (so far) of this Datatype constructor.
- */
- public int getNumSelectors()
- {
- return getNumSelectors(pointer);
- }
- private native int getNumSelectors(long pointer);
-
- /**
- * Get the DatatypeSelector at the given index
- * @param index the given index i
- * @return the i^th DatatypeSelector
- */
- public DatatypeSelector getSelector(int index)
- {
- long selectorPointer = getSelector(pointer, index);
- return new DatatypeSelector(solver, selectorPointer);
- }
- private native long getSelector(long pointer, int index);
-
- /**
- * Get the datatype selector with the given name.
- * This is a linear search through the selectors, so in case of
- * multiple, similarly-named selectors, the first is returned.
- * @param name the name of the datatype selector
- * @return the first datatype selector with the given name
- */
- public DatatypeSelector getSelector(String name)
- {
- long selectorPointer = getSelector(pointer, name);
- return new DatatypeSelector(solver, selectorPointer);
- }
- private native long getSelector(long pointer, String name);
-
- /**
- * Get the term representation of the datatype selector with the given name.
- * This is a linear search through the arguments, so in case of multiple,
- * similarly-named arguments, the selector for the first is returned.
- * @param name the name of the datatype selector
- * @return a term representing the datatype selector with the given name
- */
- public Term getSelectorTerm(String name)
- {
- long termPointer = getSelectorTerm(pointer, name);
- return new Term(solver, termPointer);
- }
- private native long getSelectorTerm(long pointer, String name);
-
- /**
- * @return true if this DatatypeConstructor is a null object
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return a string representation of this datatype constructor
- */
- protected native String toString(long pointer);
-
- public class ConstIterator implements Iterator<DatatypeSelector>
- {
- private int currentIndex;
- private int size;
-
- public ConstIterator()
- {
- currentIndex = -1;
- size = getNumSelectors();
- }
-
- @Override
- public boolean hasNext()
- {
- return currentIndex < size - 1;
- }
-
- @Override
- public DatatypeSelector next()
- {
- if (currentIndex >= size - 1)
- {
- throw new NoSuchElementException();
- }
- currentIndex++;
-
- return getSelector(currentIndex);
- }
- }
-
- @Override
- public Iterator<DatatypeSelector> iterator()
- {
- return new ConstIterator();
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class DatatypeConstructorDecl extends AbstractPointer
-{
- // region construction and destruction
- DatatypeConstructorDecl(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Add datatype selector declaration.
- * @param name the name of the datatype selector declaration to add
- * @param sort the codomain sort of the datatype selector declaration to add
- */
- public void addSelector(String name, Sort sort)
- {
- addSelector(pointer, name, sort.getPointer());
- }
-
- private native void addSelector(long pointer, String name, long sortPointer);
-
- /**
- * Add datatype selector declaration whose codomain type is the datatype
- * itself.
- * @param name the name of the datatype selector declaration to add
- */
- public void addSelectorSelf(String name)
- {
- addSelectorSelf(pointer, name);
- }
-
- private native void addSelectorSelf(long pointer, String name);
-
- /**
- * @return true if this DatatypeConstructorDecl is a null declaration.
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return a string representation of this datatype constructor declaration
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class DatatypeDecl extends AbstractPointer
-{
- // region construction and destruction
- DatatypeDecl(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
- /**
- * Add datatype constructor declaration.
- * @param ctor the datatype constructor declaration to add
- */
- public void addConstructor(DatatypeConstructorDecl ctor)
- {
- addConstructor(pointer, ctor.getPointer());
- }
-
- private native void addConstructor(long pointer, long declPointer);
-
- /** Get the number of constructors (so far) for this Datatype declaration. */
- int getNumConstructors()
- {
- return getNumConstructors(pointer);
- }
-
- private native int getNumConstructors(long pointer);
-
- /** @return true if this datatype is parametric */
- public boolean isParametric()
- {
- return isParametric(pointer);
- }
-
- private native boolean isParametric(long pointer);
-
- /**
- * @return true if this DatatypeDecl is a null object
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return a string representation of this datatype declaration
- */
- protected native String toString(long pointer);
-
- /** @return the name of this datatype declaration. */
- public String getName()
- {
- return getName(pointer);
- }
-
- private native String getName(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class DatatypeSelector extends AbstractPointer
-{
- // region construction and destruction
- DatatypeSelector(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /** @return the name of this Datatype selector. */
- public String getName()
- {
- return getName(pointer);
- }
-
- private native String getName(long pointer);
-
- /**
- * Get the selector operator of this datatype selector.
- * @return the selector term
- */
- public Term getSelectorTerm()
- {
- long termPointer = getSelectorTerm(pointer);
- return new Term(solver, termPointer);
- }
-
- private native long getSelectorTerm(long pointer);
-
- /**
- * Get the upater operator of this datatype selector.
- * @return the updater term
- */
- public Term getUpdaterTerm()
- {
- long termPointer = getUpdaterTerm(pointer);
- return new Term(solver, termPointer);
- }
-
- private native long getUpdaterTerm(long pointer);
-
- /** @return the codomain sort of this selector. */
- public Sort getCodomainSort()
- {
- long sortPointer = getCodomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getCodomainSort(long pointer);
-
- /**
- * @return true if this DatatypeSelector is a null object
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return a string representation of this datatype selector
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class Grammar extends AbstractPointer
-{
- // region construction and destruction
- Grammar(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- public Grammar(Grammar grammar)
- {
- super(grammar.solver, copyGrammar(grammar.pointer));
- }
-
- private static native long copyGrammar(long pointer);
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Add \p rule to the set of rules corresponding to \p ntSymbol.
- * @param ntSymbol the non-terminal to which the rule is added
- * @param rule the rule to add
- */
- public void addRule(Term ntSymbol, Term rule)
- {
- addRule(pointer, ntSymbol.getPointer(), rule.getPointer());
- }
-
- private native void addRule(long pointer, long ntSymbolPointer, long rulePointer);
-
- /**
- * Add \p rules to the set of rules corresponding to \p ntSymbol.
- * @param ntSymbol the non-terminal to which the rules are added
- * @param rules the rules to add
- */
- public void addRules(Term ntSymbol, Term[] rules)
- {
- long[] pointers = Utils.getPointers(rules);
- addRules(pointer, ntSymbol.getPointer(), pointers);
- }
-
- public native void addRules(long pointer, long ntSymbolPointer, long[] rulePointers);
-
- /**
- * Allow \p ntSymbol to be an arbitrary constant.
- * @param ntSymbol the non-terminal allowed to be any constant
- */
- public void addAnyConstant(Term ntSymbol)
- {
- addAnyConstant(pointer, ntSymbol.getPointer());
- }
-
- private native void addAnyConstant(long pointer, long ntSymbolPointer);
-
- /**
- * Allow \p ntSymbol to be any input variable to corresponding
- * synth-fun/synth-inv with the same sort as \p ntSymbol.
- * @param ntSymbol the non-terminal allowed to be any input constant
- */
- public void addAnyVariable(Term ntSymbol)
- {
- addAnyVariable(pointer, ntSymbol.getPointer());
- }
-
- private native void addAnyVariable(long pointer, long ntSymbolPointer);
-
- /**
- * @return a string representation of this grammar.
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-interface IPointer {
- long getPointer();
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class Op extends AbstractPointer
-{
- // region construction and destruction
- Op(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Syntactic equality operator.
- * Return true if both operators are syntactically identical.
- * Both operators must belong to the same solver object.
- * @param t the operator to compare to for equality
- * @return true if the operators are equal
- */
- @Override
- public boolean equals(Object t)
- {
- if (this == t)
- return true;
- if (t == null || getClass() != t.getClass())
- return false;
- return equals(pointer, ((Op) t).getPointer());
- }
-
- private native boolean equals(long pointer1, long pointer2);
-
- /**
- * @return the kind of this operator
- */
- public Kind getKind()
- {
- try
- {
- int value = getKind(pointer);
- return Kind.fromInt(value);
- }
- catch (CVC5ApiException e)
- {
- e.printStackTrace();
- throw new RuntimeException(e.getMessage());
- }
- }
-
- private native int getKind(long pointer);
-
- /**
- * @return true if this operator is a null term
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return true iff this operator is indexed
- */
- public boolean isIndexed()
- {
- return isIndexed(pointer);
- }
-
- private native boolean isIndexed(long pointer);
-
- /**
- * @return the number of indices of this op
- */
- public int getNumIndices()
- {
- return getNumIndices(pointer);
- }
-
- private native int getNumIndices(long pointer);
-
- /**
- * Get the index at position i.
- * @param i the position of the index to return
- * @return the index at position i
- */
- public Term get(int i) throws CVC5ApiException
- {
- Utils.validateUnsigned(i, "index");
- long termPointer = get(pointer, i);
- return new Term(solver, termPointer);
- }
-
- private native long get(long pointer, int i);
-
- /**
- * @return a string representation of this operator
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Gereon Kremer, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.math.BigInteger;
-
-/**
- * Holds some description about a particular option, including its name, its
- * aliases, whether the option was explicitly set by the user, and information
- * concerning its value. The `valueInfo` member holds any of the following
- * alternatives:
- * - VoidInfo if the option holds no value (or the value has no native type)
- * - ValueInfo if the option is of type boolean or String, holds the
- * current value and the default value.
- * - NumberInfo if the option is of type BigInteger or double, holds
- * the current and default value, as well as the minimum and maximum.
- * - ModeInfo if the option is a mode option, holds the current and default
- * values, as well as a list of valid modes.
- * Additionally, this class provides convenience functions to obtain the
- * current value of an option in a type-safe manner using boolValue(),
- * stringValue(), intValue(), and doubleValue(). They assert that
- * the option has the respective type and return the current value.
- */
-public class OptionInfo extends AbstractPointer
-{
- // region construction and destruction
- OptionInfo(Solver solver, long pointer)
- {
- super(solver, pointer);
- this.name = getName(pointer);
- this.aliases = getAliases(pointer);
- this.setByUser = getSetByUser(pointer);
- this.baseInfo = getBaseInfo(pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- public String toString()
- {
- return toString(pointer);
- }
-
- /**
- * @return a string representation of this optionInfo.
- */
- protected native String toString(long pointer);
-
- // endregion
-
- /** Abstract class for OptionInfo values */
- public abstract class BaseInfo
- {
- }
-
- /** Has the current and the default value */
- public class ValueInfo<T> extends BaseInfo
- {
- private final T defaultValue;
- private final T currentValue;
- public ValueInfo(T defaultValue, T currentValue)
- {
- this.defaultValue = defaultValue;
- this.currentValue = currentValue;
- }
- public T getDefaultValue()
- {
- return defaultValue;
- }
- public T getCurrentValue()
- {
- return currentValue;
- }
- }
-
- public class ModeInfo extends ValueInfo<String>
- {
- private final String[] modes;
-
- public ModeInfo(String defaultValue, String currentValue, String[] modes)
- {
- super(defaultValue, currentValue);
- this.modes = modes;
- }
- public String[] getModes()
- {
- return modes;
- }
- }
-
- /** Has no value information */
- public class VoidInfo extends BaseInfo
- {
- }
-
- /** Default value, current value, minimum and maximum of a numeric value */
- public class NumberInfo<T> extends ValueInfo<T>
- {
- private final T minimum;
- private final T maximum;
- public NumberInfo(T defaultValue, T currentValue, T minimum, T maximum)
- {
- super(defaultValue, currentValue);
- this.minimum = minimum;
- this.maximum = maximum;
- }
- public T getMinimum()
- {
- return minimum;
- }
- public T getMaximum()
- {
- return maximum;
- }
- }
-
- private native String getName(long pointer);
-
- private native String[] getAliases(long pointer);
-
- private native boolean getSetByUser(long pointer);
-
- private native BaseInfo getBaseInfo(long pointer);
-
- /** The option name */
- private final String name;
- public String getName()
- {
- return name;
- }
- /** The option name aliases */
- private final String[] aliases;
- public String[] getAliases()
- {
- return aliases;
- }
- /** Whether the option was explicitly set by the user */
- private final boolean setByUser;
- public boolean getSetByUser()
- {
- return setByUser;
- }
-
- /** The option variant information */
- private final BaseInfo baseInfo;
- public BaseInfo getBaseInfo()
- {
- return baseInfo;
- }
-
- /**
- * Obtain the current value as a boolean. Asserts that valueInfo holds a boolean.
- */
- public boolean booleanValue()
- {
- return booleanValue(pointer);
- }
-
- private native boolean booleanValue(long pointer);
-
- /**
- * Obtain the current value as a string. Asserts that valueInfo holds a
- * string.
- */
- public String stringValue()
- {
- return stringValue(pointer);
- }
-
- private native String stringValue(long pointer);
-
- /**
- * Obtain the current value as as int. Asserts that valueInfo holds an int.
- */
- public BigInteger intValue()
- {
- return intValue(pointer);
- }
-
- private native BigInteger intValue(long pointer);
-
- /**
- * Obtain the current value as a double. Asserts that valueInfo holds a
- * double.
- */
- public double doubleValue()
- {
- return doubleValue(pointer);
- }
-
- private native double doubleValue(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class Pair<K, V>
-{
- public K first;
- public V second;
- public Pair(K first, V second)
- {
- this.first = first;
- this.second = second;
- }
-
- @Override
- public boolean equals(Object pair)
- {
- if (this == pair)
- return true;
- if (pair == null || getClass() != pair.getClass())
- return false;
-
- return first.equals(((Pair<?, ?>) pair).first) && second.equals(((Pair<?, ?>) pair).second);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class Result extends AbstractPointer
-{
- // region construction and destruction
- Result(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * @return true if Result is empty, i.e., a nullary Result, and not an actual
- * result returned from a checkSat() (and friends) query.
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return true if query was a satisfiable checkSat() or checkSatAssuming()
- * query.
- */
- public boolean isSat()
- {
- return isSat(pointer);
- }
-
- private native boolean isSat(long pointer);
-
- /**
- * @return true if query was an unsatisfiable checkSat() or
- * checkSatAssuming() query.
- */
- public boolean isUnsat()
- {
- return isUnsat(pointer);
- }
-
- private native boolean isUnsat(long pointer);
-
- /**
- * @return true if query was a checkSat() or checkSatAssuming() query and
- * cvc5 was not able to determine (un)satisfiability.
- */
- public boolean isUnknown()
- {
- return isUnknown(pointer);
- }
-
- private native boolean isUnknown(long pointer);
-
- /**
- * Operator overloading for equality of two results.
- * @param r the result to compare to for equality
- * @return true if the results are equal
- */
- @Override
- public boolean equals(Object r)
- {
- if (this == r)
- return true;
- if (r == null || getClass() != r.getClass())
- return false;
- Result result = (Result) r;
- if (this.pointer == result.pointer)
- {
- return true;
- }
- return equals(pointer, result.getPointer());
- }
-
- private native boolean equals(long pointer1, long pointer2);
-
- /**
- * @return an explanation for an unknown query result.
- */
- public UnknownExplanation getUnknownExplanation()
- {
- try
- {
- int explanation = getUnknownExplanation(pointer);
- return UnknownExplanation.fromInt(explanation);
- }
- catch (CVC5ApiException e)
- {
- e.printStackTrace();
- throw new RuntimeException(e.getMessage());
- }
- }
-
- private native int getUnknownExplanation(long pointer);
-
- /**
- * @return a string representation of this result.
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.io.IOException;
-import java.util.*;
-
-public class Solver implements IPointer, AutoCloseable
-{
- private long pointer;
-
- public long getPointer()
- {
- return pointer;
- }
-
- private native long newSolver();
-
- public void deletePointer()
- {
- if (pointer != 0)
- {
- deletePointer(pointer);
- }
- pointer = 0;
- }
-
- private static native void deletePointer(long pointer);
-
- // store pointers for terms, sorts, etc
- List<AbstractPointer> abstractPointers = new ArrayList<>();
-
- @Override
- public void close()
- {
- // delete heap memory for terms, sorts, etc
- for (int i = abstractPointers.size() - 1; i >= 0; i--)
- {
- abstractPointers.get(i).deletePointer();
- }
- // delete the heap memory for this solver
- deletePointer();
- }
-
- void addAbstractPointer(AbstractPointer abstractPointer)
- {
- abstractPointers.add(abstractPointer);
- }
-
- static
- {
- Utils.loadLibraries();
- }
-
- /* .................................................................... */
- /* Constructors */
- /* .................................................................... */
-
- public Solver()
- {
- this.pointer = newSolver();
- }
-
- /* .................................................................... */
- /* Sorts Handling */
- /* .................................................................... */
-
- /**
- * @return sort null
- */
-
- public Sort getNullSort()
- {
- long sortPointer = getNullSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getNullSort(long pointer);
-
- /**
- * @return sort Boolean
- */
- public Sort getBooleanSort()
- {
- long sortPointer = getBooleanSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getBooleanSort(long pointer);
-
- /**
- * @return sort Integer (in cvc5, Integer is a subtype of Real)
- */
- public Sort getIntegerSort()
- {
- long sortPointer = getIntegerSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- public native long getIntegerSort(long pointer);
- /**
- * @return sort Real
- */
- public Sort getRealSort()
- {
- long sortPointer = getRealSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getRealSort(long pointer);
- /**
- * @return sort RegExp
- */
- public Sort getRegExpSort()
- {
- long sortPointer = getRegExpSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getRegExpSort(long pointer);
- /**
- * @return sort RoundingMode
- * @throws CVC5ApiException
- */
- public Sort getRoundingModeSort() throws CVC5ApiException
- {
- long sortPointer = getRoundingModeSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getRoundingModeSort(long pointer) throws CVC5ApiException;
- /**
- * @return sort String
- */
- public Sort getStringSort()
- {
- long sortPointer = getStringSort(pointer);
- return new Sort(this, sortPointer);
- }
-
- private native long getStringSort(long solverPointer);
- /**
- * Create an array sort.
- * @param indexSort the array index sort
- * @param elemSort the array element sort
- * @return the array sort
- */
- public Sort mkArraySort(Sort indexSort, Sort elemSort)
- {
- long sortPointer = mkArraySort(pointer, indexSort.getPointer(), elemSort.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkArraySort(long pointer, long indexSortPointer, long elementSortPointer);
-
- /**
- * Create a bit-vector sort.
- * @param size the bit-width of the bit-vector sort
- * @return the bit-vector sort
- * @throws CVC5ApiException
- */
- public Sort mkBitVectorSort(int size) throws CVC5ApiException
- {
- Utils.validateUnsigned(size, "size");
- long sortPointer = mkBitVectorSort(pointer, size);
- return new Sort(this, sortPointer);
- }
-
- private native long mkBitVectorSort(long pointer, int size);
-
- /**
- * Create a floating-point sort.
- * @param exp the bit-width of the exponent of the floating-point sort.
- * @param sig the bit-width of the significand of the floating-point sort.
- * @throws CVC5ApiException
- */
- public Sort mkFloatingPointSort(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long sortPointer = mkFloatingPointSort(pointer, exp, sig);
- return new Sort(this, sortPointer);
- }
-
- private native long mkFloatingPointSort(long solverPointer, int exp, int sig);
-
- /**
- * Create a datatype sort.
- * @param dtypedecl the datatype declaration from which the sort is
- * created
- * @return the datatype sort
- * @throws CVC5ApiException
- */
- public Sort mkDatatypeSort(DatatypeDecl dtypedecl) throws CVC5ApiException
- {
- long pointer = mkDatatypeSort(this.pointer, dtypedecl.getPointer());
- return new Sort(this, pointer);
- }
-
- private native long mkDatatypeSort(long pointer, long datatypeDeclPointer)
- throws CVC5ApiException;
-
- /**
- * Create a vector of datatype sorts. The names of the datatype
- * declarations must be distinct.
- *
- * @param dtypedecls the datatype declarations from which the sort is
- * created
- * @return the datatype sorts
- * @throws CVC5ApiException
- */
- public Sort[] mkDatatypeSorts(List<DatatypeDecl> dtypedecls) throws CVC5ApiException
- {
- return mkDatatypeSorts(dtypedecls.toArray(new DatatypeDecl[0]));
- }
-
- /**
- * Create a vector of datatype sorts. The names of the datatype
- * declarations must be distinct.
- *
- * @param dtypedecls the datatype declarations from which the sort is
- * created
- * @return the datatype sorts
- * @throws CVC5ApiException
- */
- public Sort[] mkDatatypeSorts(DatatypeDecl[] dtypedecls) throws CVC5ApiException
- {
- long[] declPointers = Utils.getPointers(dtypedecls);
- long[] sortPointers = mkDatatypeSorts(pointer, declPointers);
- Sort[] sorts = Utils.getSorts(this, sortPointers);
- return sorts;
- }
-
- private native long[] mkDatatypeSorts(long pointer, long[] declPointers) throws CVC5ApiException;
-
- /**
- * Create a vector of datatype sorts using unresolved sorts. The names of
- * the datatype declarations in dtypedecls must be distinct.
- *
- * This method is called when the DatatypeDecl objects dtypedecls have
- * been built using "unresolved" sorts.
- *
- * We associate each sort in unresolvedSorts with exacly one datatype from
- * dtypedecls. In particular, it must have the same name as exactly one
- * datatype declaration in dtypedecls.
- *
- * When constructing datatypes, unresolved sorts are replaced by the
- * datatype sort constructed for the datatype declaration it is associated
- * with.
- *
- * @apiNote Create unresolved sorts with Solver::mkUnresolvedSort().
- *
- * @param dtypedecls the datatype declarations from which the sort is
- * created
- * @param unresolvedSorts the set of unresolved sorts
- * @return the datatype sorts
- * @throws CVC5ApiException
- */
- public List<Sort> mkDatatypeSorts(List<DatatypeDecl> dtypedecls, Set<Sort> unresolvedSorts)
- throws CVC5ApiException
- {
- Sort[] array = mkDatatypeSorts(
- dtypedecls.toArray(new DatatypeDecl[0]), unresolvedSorts.toArray(new Sort[0]));
- return Arrays.asList(array);
- }
-
- /**
- * Create a vector of datatype sorts using unresolved sorts. The names of
- * the datatype declarations in dtypedecls must be distinct.
- *
- * This method is called when the DatatypeDecl objects dtypedecls have
- * been built using "unresolved" sorts.
- *
- * We associate each sort in unresolvedSorts with exacly one datatype from
- * dtypedecls. In particular, it must have the same name as exactly one
- * datatype declaration in dtypedecls.
- *
- * When constructing datatypes, unresolved sorts are replaced by the
- * datatype sort constructed for the datatype declaration it is associated
- * with.
- *
- * @param dtypedecls the datatype declarations from which the sort is
- * created
- * @param unresolvedSorts the list of unresolved sorts
- * @return the datatype sorts
- */
- public Sort[] mkDatatypeSorts(DatatypeDecl[] dtypedecls, Sort[] unresolvedSorts)
- throws CVC5ApiException
- {
- long[] declPointers = Utils.getPointers(dtypedecls);
- long[] unresolvedPointers = Utils.getPointers(unresolvedSorts);
- long[] sortPointers = mkDatatypeSorts(pointer, declPointers, unresolvedPointers);
- Sort[] sorts = Utils.getSorts(this, sortPointers);
- return sorts;
- }
-
- private native long[] mkDatatypeSorts(
- long pointer, long[] declPointers, long[] unresolvedPointers) throws CVC5ApiException;
-
- /**
- * Create function sort.
- * @param domain the sort of the fuction argument
- * @param codomain the sort of the function return value
- * @return the function sort
- */
- public Sort mkFunctionSort(Sort domain, Sort codomain)
- {
- long sortPointer = mkFunctionSort(pointer, domain.getPointer(), codomain.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkFunctionSort(long pointer, long domainPointer, long codomainPointer);
-
- /**
- * Create function sort.
- * @param sorts the sort of the function arguments
- * @param codomain the sort of the function return value
- * @return the function sort
- */
- public Sort mkFunctionSort(Sort[] sorts, Sort codomain)
- {
- long sortPointer = mkFunctionSort(pointer, Utils.getPointers(sorts), codomain.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkFunctionSort(long pointer, long[] sortPointers, long codomainPointer);
-
- /**
- * Create a sort parameter.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param symbol the name of the sort
- * @return the sort parameter
- */
- public Sort mkParamSort(String symbol)
- {
- long sortPointer = mkParamSort(pointer, symbol);
- return new Sort(this, sortPointer);
- }
-
- private native long mkParamSort(long pointer, String symbol);
-
- /**
- * Create a predicate sort.
- * @param sorts the list of sorts of the predicate
- * @return the predicate sort
- */
- public Sort mkPredicateSort(Sort[] sorts)
- {
- long sortPointer = mkPredicateSort(pointer, Utils.getPointers(sorts));
- return new Sort(this, sortPointer);
- }
-
- private native long mkPredicateSort(long pointer, long[] sortPointers);
-
- /**
- * Create a record sort
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param fields the list of fields of the record
- * @return the record sort
- */
- public Sort mkRecordSort(Pair<String, Sort>[] fields)
- {
- long sortPointer = mkRecordSort(pointer, Utils.getPairs(fields));
- return new Sort(this, sortPointer);
- }
-
- private native long mkRecordSort(long pointer, Pair<String, Long>[] fields);
-
- /**
- * Create a set sort.
- * @param elemSort the sort of the set elements
- * @return the set sort
- */
- public Sort mkSetSort(Sort elemSort)
- {
- long sortPointer = mkSetSort(pointer, elemSort.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkSetSort(long pointer, long elemSortPointer);
- /**
- * Create a bag sort.
- * @param elemSort the sort of the bag elements
- * @return the bag sort
- */
- public Sort mkBagSort(Sort elemSort)
- {
- long sortPointer = mkBagSort(pointer, elemSort.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkBagSort(long pointer, long elemSortPointer);
-
- /**
- * Create a sequence sort.
- * @param elemSort the sort of the sequence elements
- * @return the sequence sort
- */
- public Sort mkSequenceSort(Sort elemSort)
- {
- long sortPointer = mkSequenceSort(pointer, elemSort.getPointer());
- return new Sort(this, sortPointer);
- }
-
- private native long mkSequenceSort(long pointer, long elemSortPointer);
-
- /**
- * Create an uninterpreted sort.
- * @param symbol the name of the sort
- * @return the uninterpreted sort
- */
- public Sort mkUninterpretedSort(String symbol)
- {
- long sortPointer = mkUninterpretedSort(pointer, symbol);
- return new Sort(this, sortPointer);
- }
-
- private native long mkUninterpretedSort(long pointer, String symbol);
-
- /**
- * Create an unresolved sort.
- *
- * This is for creating yet unresolved sort placeholders for mutually
- * recursive datatypes.
- *
- * @param symbol the symbol of the sort
- * @param arity the number of sort parameters of the sort
- * @return the unresolved sort
- * @throws CVC5ApiException
- */
- public Sort mkUnresolvedSort(String symbol, int arity) throws CVC5ApiException
- {
- Utils.validateUnsigned(arity, "arity");
- long sortPointer = mkUnresolvedSort(pointer, symbol, arity);
- return new Sort(this, sortPointer);
- }
-
- private native long mkUnresolvedSort(long pointer, String symbol, int arity);
-
- /**
- * Create an unresolved sort.
- *
- * This is for creating yet unresolved sort placeholders for mutually
- * recursive datatypes without sort parameters.
- *
- * @param symbol the symbol of the sort
- * @return the unresolved sort
- * @throws CVC5ApiException
- */
- public Sort mkUnresolvedSort(String symbol) throws CVC5ApiException
- {
- return mkUnresolvedSort(symbol, 0);
- }
-
- /**
- * Create a sort constructor sort.
- *
- * An uninterpreted sort constructor is an uninterpreted sort with
- * arity > 0.
- *
- * @param symbol the symbol of the sort
- * @param arity the arity of the sort (must be > 0)
- * @return the sort constructor sort
- * @throws CVC5ApiException
- */
- public Sort mkUninterpretedSortConstructorSort(String symbol, int arity) throws CVC5ApiException
- {
- Utils.validateUnsigned(arity, "arity");
- long sortPointer = mkUninterpretedSortConstructorSort(pointer, symbol, arity);
- return new Sort(this, sortPointer);
- }
-
- private native long mkUninterpretedSortConstructorSort(long pointer, String symbol, int arity);
-
- /**
- * Create a tuple sort.
- * @param sorts of the elements of the tuple
- * @return the tuple sort
- */
- public Sort mkTupleSort(Sort[] sorts)
- {
- long[] sortPointers = Utils.getPointers(sorts);
- long sortPointer = mkTupleSort(pointer, sortPointers);
- return new Sort(this, sortPointer);
- }
-
- private native long mkTupleSort(long pointer, long[] sortPointers);
-
- /* .................................................................... */
- /* Create Terms */
- /* .................................................................... */
-
- /**
- * Create 0-ary term of given kind.
- * @param kind the kind of the term
- * @return the Term
- */
- public Term mkTerm(Kind kind)
- {
- long termPointer = mkTerm(pointer, kind.getValue());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, int kindValue);
-
- /**
- * Create a unary term of given kind.
- * @param kind the kind of the term
- * @param child the child of the term
- * @return the Term
- */
- public Term mkTerm(Kind kind, Term child)
- {
- long termPointer = mkTerm(pointer, kind.getValue(), child.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, int kindValue, long childPointer);
-
- /**
- * Create binary term of given kind.
- * @param kind the kind of the term
- * @param child1 the first child of the term
- * @param child2 the second child of the term
- * @return the Term
- */
- public Term mkTerm(Kind kind, Term child1, Term child2)
- {
- long termPointer = mkTerm(pointer, kind.getValue(), child1.getPointer(), child2.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, int kindValue, long child1Pointer, long child2Pointer);
-
- /**
- * Create ternary term of given kind.
- * @param kind the kind of the term
- * @param child1 the first child of the term
- * @param child2 the second child of the term
- * @param child3 the third child of the term
- * @return the Term
- */
- public Term mkTerm(Kind kind, Term child1, Term child2, Term child3)
- {
- long termPointer = mkTerm(
- pointer, kind.getValue(), child1.getPointer(), child2.getPointer(), child3.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(
- long pointer, int kindValue, long child1Pointer, long child2Pointer, long child3Pointer);
- /**
- * Create n-ary term of given kind.
- * @param kind the kind of the term
- * @param children the children of the term
- * @return the Term
- */
- public Term mkTerm(Kind kind, Term[] children)
- {
- long[] childPointers = Utils.getPointers(children);
- long termPointer = mkTerm(pointer, kind.getValue(), childPointers);
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, int kindValue, long[] childrenPointers);
-
- /**
- * Create nullary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @return the Term
- */
- public Term mkTerm(Op op)
- {
- long termPointer = mkTerm(pointer, op.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, long opPointer);
- /**
- * Create unary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @param child the child of the term
- * @return the Term
- */
- public Term mkTerm(Op op, Term child)
- {
- long termPointer = mkTerm(pointer, op.getPointer(), child.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, long opPointer, long childPointer);
-
- /**
- * Create binary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @param child1 the first child of the term
- * @param child2 the second child of the term
- * @return the Term
- */
- public Term mkTerm(Op op, Term child1, Term child2)
- {
- long termPointer = mkTerm(pointer, op.getPointer(), child1.getPointer(), child2.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, long opPointer, long child1Pointer, long child2Pointer);
- /**
- * Create ternary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @param child1 the first child of the term
- * @param child2 the second child of the term
- * @param child3 the third child of the term
- * @return the Term
- */
- public Term mkTerm(Op op, Term child1, Term child2, Term child3)
- {
- long termPointer =
- mkTerm(op.getPointer(), child1.getPointer(), child2.getPointer(), child3.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(
- long pointer, long opPointer, long child1Pointer, long child2Pointer, long child3Pointer);
-
- /**
- * Create n-ary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @param children the children of the term
- * @return the Term
- */
- public Term mkTerm(Op op, List<Term> children)
- {
- return mkTerm(op, children.toArray(new Term[0]));
- }
-
- /**
- * Create n-ary term of given kind from a given operator.
- * Create operators with mkOp().
- * @param op the operator
- * @param children the children of the term
- * @return the Term
- */
- public Term mkTerm(Op op, Term[] children)
- {
- long[] childPointers = Utils.getPointers(children);
- long termPointer = mkTerm(pointer, op.getPointer(), childPointers);
- return new Term(this, termPointer);
- }
-
- private native long mkTerm(long pointer, long opPointer, long[] childrenPointers);
-
- /**
- * Create a tuple term. Terms are automatically converted if sorts are
- * compatible.
- * @param sorts The sorts of the elements in the tuple
- * @param terms The elements in the tuple
- * @return the tuple Term
- */
- public Term mkTuple(Sort[] sorts, Term[] terms)
- {
- long[] sortPointers = Utils.getPointers(sorts);
- long[] termPointers = Utils.getPointers(terms);
- long termPointer = mkTuple(pointer, sortPointers, termPointers);
- return new Term(this, termPointer);
- }
-
- private native long mkTuple(long pointer, long[] sortPointers, long[] termPointers);
-
- /* .................................................................... */
- /* Create Operators */
- /* .................................................................... */
-
- /**
- * Create an operator for a builtin Kind
- * The Kind may not be the Kind for an indexed operator
- * (e.g. BITVECTOR_EXTRACT).
- *
- * @apiNote In this case, the Op simply wraps the Kind. The Kind can be used
- * in mkTerm directly without creating an op first.
- *
- * @param kind the kind to wrap
- */
- public Op mkOp(Kind kind)
- {
- long opPointer = mkOp(pointer, kind.getValue());
- return new Op(this, opPointer);
- }
-
- private native long mkOp(long pointer, int kindValue);
- /**
- * Create operator of kind:
- * - RECORD_UPDATE
- * - DIVISIBLE (to support arbitrary precision integers)
- * See enum {@link Kind} for a description of the parameters.
- * @param kind the kind of the operator
- * @param arg the string argument to this operator
- */
- public Op mkOp(Kind kind, String arg)
- {
- long opPointer = mkOp(pointer, kind.getValue(), arg);
- return new Op(this, opPointer);
- }
-
- private native long mkOp(long pointer, int kindValue, String arg);
-
- /**
- * Create operator of kind:
- * - DIVISIBLE
- * - BITVECTOR_REPEAT
- * - BITVECTOR_ZERO_EXTEND
- * - BITVECTOR_SIGN_EXTEND
- * - BITVECTOR_ROTATE_LEFT
- * - BITVECTOR_ROTATE_RIGHT
- * - INT_TO_BITVECTOR
- * - FLOATINGPOINT_TO_UBV
- * - FLOATINGPOINT_TO_UBV_TOTAL
- * - FLOATINGPOINT_TO_SBV
- * - FLOATINGPOINT_TO_SBV_TOTAL
- * - TUPLE_UPDATE
- * See enum {@link Kind} for a description of the parameters.
- * @param kind the kind of the operator
- * @param arg the unsigned int argument to this operator
- * @throws CVC5ApiException
- */
- public Op mkOp(Kind kind, int arg) throws CVC5ApiException
- {
- Utils.validateUnsigned(arg, "arg");
- long opPointer = mkOp(pointer, kind.getValue(), arg);
- return new Op(this, opPointer);
- }
-
- private native long mkOp(long pointer, int kindValue, int arg);
-
- /**
- * Create operator of Kind:
- * - BITVECTOR_EXTRACT
- * - FLOATINGPOINT_TO_FP_FROM_IEEE_BV
- * - FLOATINGPOINT_TO_FP_FROM_FP
- * - FLOATINGPOINT_TO_FP_FROM_REAL
- * - FLOATINGPOINT_TO_FP_FROM_SBV
- * - FLOATINGPOINT_TO_FP_FROM_UBV
- * See enum {@link Kind} for a description of the parameters.
- * @param kind the kind of the operator
- * @param arg1 the first unsigned int argument to this operator
- * @param arg2 the second unsigned int argument to this operator
- * @throws CVC5ApiException
- */
- public Op mkOp(Kind kind, int arg1, int arg2) throws CVC5ApiException
- {
- Utils.validateUnsigned(arg1, "arg1");
- Utils.validateUnsigned(arg2, "arg2");
- long opPointer = mkOp(pointer, kind.getValue(), arg1, arg2);
- return new Op(this, opPointer);
- }
-
- private native long mkOp(long pointer, int kindValue, int arg1, int arg2);
-
- /**
- * Create operator of Kind:
- * - TUPLE_PROJECT
- * See enum {@link Kind} for a description of the parameters.
- * @param kind the kind of the operator
- * @param args the arguments (indices) of the operator
- * @throws CVC5ApiException
- */
- public Op mkOp(Kind kind, int[] args) throws CVC5ApiException
- {
- Utils.validateUnsigned(args, "args");
- long opPointer = mkOp(pointer, kind.getValue(), args);
- return new Op(this, opPointer);
- }
-
- private native long mkOp(long pointer, int kindValue, int[] args);
-
- /* .................................................................... */
- /* Create Constants */
- /* .................................................................... */
-
- /**
- * Create a Boolean true constant.
- * @return the true constant
- */
- public Term mkTrue()
- {
- long termPointer = mkTrue(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkTrue(long pointer);
- /**
- * Create a Boolean false constant.
- * @return the false constant
- */
- public Term mkFalse()
- {
- long termPointer = mkFalse(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkFalse(long pointer);
- /**
- * Create a Boolean constant.
- * @return the Boolean constant
- * @param val the value of the constant
- */
- public Term mkBoolean(boolean val)
- {
- long termPointer = mkBoolean(pointer, val);
- return new Term(this, termPointer);
- }
-
- private native long mkBoolean(long pointer, boolean val);
- /**
- * Create a constant representing the number Pi.
- * @return a constant representing Pi
- */
- public Term mkPi()
- {
- long termPointer = mkPi(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkPi(long pointer);
- /**
- * Create an integer constant from a string.
- * @param s the string representation of the constant, may represent an
- * integer (e.g., "123").
- * @return a constant of sort Integer assuming 's' represents an integer)
- * @throws CVC5ApiException
- */
- public Term mkInteger(String s) throws CVC5ApiException
- {
- long termPointer = mkInteger(pointer, s);
- return new Term(this, termPointer);
- }
-
- private native long mkInteger(long pointer, String s) throws CVC5ApiException;
-
- /**
- * Create an integer constant from a c++ int.
- * @param val the value of the constant
- * @return a constant of sort Integer
- */
- public Term mkInteger(long val)
- {
- long termPointer = mkInteger(pointer, val);
- return new Term(this, termPointer);
- }
-
- private native long mkInteger(long pointer, long val);
- /**
- * Create a real constant from a string.
- * @param s the string representation of the constant, may represent an
- * integer (e.g., "123") or real constant (e.g., "12.34" or
- * "12/34").
- * @return a constant of sort Real
- * @throws CVC5ApiException
- */
- public Term mkReal(String s) throws CVC5ApiException
- {
- long termPointer = mkReal(pointer, s);
- return new Term(this, termPointer);
- }
-
- private native long mkReal(long pointer, String s) throws CVC5ApiException;
- /**
- * Create a real constant from an integer.
- * @param val the value of the constant
- * @return a constant of sort Integer
- */
- public Term mkReal(long val)
- {
- long termPointer = mkRealValue(pointer, val);
- return new Term(this, termPointer);
- }
-
- private native long mkRealValue(long pointer, long val);
- /**
- * Create a real constant from a rational.
- * @param num the value of the numerator
- * @param den the value of the denominator
- * @return a constant of sort Real
- */
- public Term mkReal(long num, long den)
- {
- long termPointer = mkReal(pointer, num, den);
- return new Term(this, termPointer);
- }
-
- private native long mkReal(long pointer, long num, long den);
-
- /**
- * Create a regular expression none (re.none) term.
- * @return the none term
- */
- public Term mkRegexpNone()
- {
- long termPointer = mkRegexpNone(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkRegexpNone(long pointer);
-
- /**
- * Create a regular expression all (re.all) term.
- * @return the all term
- */
- public Term mkRegexpAll()
- {
- long termPointer = mkRegexpAll(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkRegexpAll(long pointer);
-
- /**
- * Create a regular expression allchar (re.allchar) term.
- * @return the allchar term
- */
- public Term mkRegexpAllchar()
- {
- long termPointer = mkRegexpAllchar(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkRegexpAllchar(long pointer);
-
- /**
- * Create a constant representing an empty set of the given sort.
- * @param sort the sort of the set elements.
- * @return the empty set constant
- */
- public Term mkEmptySet(Sort sort)
- {
- long termPointer = mkEmptySet(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkEmptySet(long pointer, long sortPointer);
- /**
- * Create a constant representing an empty bag of the given sort.
- * @param sort the sort of the bag elements.
- * @return the empty bag constant
- */
- public Term mkEmptyBag(Sort sort)
- {
- long termPointer = mkEmptyBag(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkEmptyBag(long pointer, long sortPointer);
-
- /**
- * Create a separation logic empty term.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return the separation logic empty term
- */
- public Term mkSepEmp()
- {
- long termPointer = mkSepEmp(pointer);
- return new Term(this, termPointer);
- }
-
- private native long mkSepEmp(long pointer);
-
- /**
- * Create a separation logic nil term.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param sort the sort of the nil term
- * @return the separation logic nil term
- */
- public Term mkSepNil(Sort sort)
- {
- long termPointer = mkSepNil(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkSepNil(long pointer, long sortPointer);
-
- /**
- * Create a String constant.
- * @param s the string this constant represents
- * @return the String constant
- */
- public Term mkString(String s)
- {
- return mkString(s, false);
- }
-
- /**
- * Create a String constant.
- * @param s the string this constant represents
- * @param useEscSequences determines whether escape sequences in `s`
- * should be converted to the corresponding unicode character
- * @return the String constant
- */
- public Term mkString(String s, boolean useEscSequences)
- {
- // TODO: review unicode
- long termPointer = mkString(pointer, s, useEscSequences);
- return new Term(this, termPointer);
- }
-
- private native long mkString(long pointer, String s, boolean useEscSequences);
-
- /**
- * Create a String constant.
- * @param s a list of unsigned (unicode) values this constant represents
- * as
- * string
- * @return the String constant
- * @throws CVC5ApiException
- */
- public Term mkString(int[] s) throws CVC5ApiException
- {
- Utils.validateUnsigned(s, "s");
- long termPointer = mkString(pointer, s);
- return new Term(this, termPointer);
- }
-
- private native long mkString(long pointer, int[] s);
-
- /**
- * Create an empty sequence of the given element sort.
- * @param sort The element sort of the sequence.
- * @return the empty sequence with given element sort.
- */
- public Term mkEmptySequence(Sort sort)
- {
- long termPointer = mkEmptySequence(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkEmptySequence(long pointer, long sortPointer);
-
- /**
- * Create a universe set of the given sort.
- * @param sort the sort of the set elements
- * @return the universe set constant
- */
- public Term mkUniverseSet(Sort sort)
- {
- long termPointer = mkUniverseSet(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkUniverseSet(long pointer, long sortPointer);
-
- /**
- * Create a bit-vector constant of given size and value = 0.
- * @param size the bit-width of the bit-vector sort
- * @return the bit-vector constant
- */
- public Term mkBitVector(int size) throws CVC5ApiException
- {
- return mkBitVector(size, 0);
- }
-
- /**
- * Create a bit-vector constant of given size and value.
- *
- * @apiNote The given value must fit into a bit-vector of the given size.
- *
- * @param size the bit-width of the bit-vector sort
- * @param val the value of the constant
- * @return the bit-vector constant
- * @throws CVC5ApiException
- */
- public Term mkBitVector(int size, long val) throws CVC5ApiException
- {
- Utils.validateUnsigned(size, "size");
- Utils.validateUnsigned(val, "val");
- long termPointer = mkBitVector(pointer, size, val);
- return new Term(this, termPointer);
- }
-
- private native long mkBitVector(long pointer, int size, long val);
-
- /**
- * Create a bit-vector constant of a given bit-width from a given string of
- * base 2, 10 or 16.
- *
- * @apiNote The given value must fit into a bit-vector of the given size.
- *
- * @param size the bit-width of the constant
- * @param s the string representation of the constant
- * @param base the base of the string representation (2, 10, or 16)
- * @return the bit-vector constant
- * @throws CVC5ApiException
- */
- public Term mkBitVector(int size, String s, int base) throws CVC5ApiException
- {
- Utils.validateUnsigned(size, "size");
- Utils.validateUnsigned(base, "base");
- long termPointer = mkBitVector(pointer, size, s, base);
- return new Term(this, termPointer);
- }
-
- private native long mkBitVector(long pointer, int size, String s, int base);
-
- /**
- * Create a constant array with the provided constant value stored at
- * every index
- * @param sort the sort of the constant array (must be an array sort)
- * @param val the constant value to store (must match the sort's element
- * sort)
- * @return the constant array term
- */
- public Term mkConstArray(Sort sort, Term val)
- {
- long termPointer = mkConstArray(pointer, sort.getPointer(), val.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkConstArray(long pointer, long sortPointer, long valPointer);
- /**
- * Create a positive infinity floating-point constant.
- * @param exp Number of bits in the exponent
- * @param sig Number of bits in the significand
- * @return the floating-point constant
- * @throws CVC5ApiException
- */
- public Term mkFloatingPointPosInf(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPointPosInf(pointer, exp, sig);
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPointPosInf(long pointer, int exp, int sig);
- /**
- * Create a negative infinity floating-point constant.
- * @param exp Number of bits in the exponent
- * @param sig Number of bits in the significand
- * @return the floating-point constant
- * @throws CVC5ApiException
- */
- public Term mkFloatingPointNegInf(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPointNegInf(pointer, exp, sig);
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPointNegInf(long pointer, int exp, int sig);
- /**
- * Create a not-a-number (NaN) floating-point constant.
- * @param exp Number of bits in the exponent
- * @param sig Number of bits in the significand
- * @return the floating-point constant
- * @throws CVC5ApiException
- */
- public Term mkFloatingPointNaN(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPointNaN(pointer, exp, sig);
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPointNaN(long pointer, int exp, int sig);
-
- /**
- * Create a positive zero (+0.0) floating-point constant.
- * @param exp Number of bits in the exponent
- * @param sig Number of bits in the significand
- * @return the floating-point constant
- * @throws CVC5ApiException
- */
- public Term mkFloatingPointPosZero(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPointPosZero(pointer, exp, sig);
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPointPosZero(long pointer, int exp, int sig);
-
- /**
- * Create a negative zero (-0.0) floating-point constant.
- * @param exp Number of bits in the exponent
- * @param sig Number of bits in the significand
- * @return the floating-point constant
- * @throws CVC5ApiException
- */
- public Term mkFloatingPointNegZero(int exp, int sig) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPointNegZero(pointer, exp, sig);
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPointNegZero(long pointer, int exp, int sig);
-
- /**
- * Create a roundingmode constant.
- * @param rm the floating point rounding mode this constant represents
- */
- public Term mkRoundingMode(RoundingMode rm)
- {
- long termPointer = mkRoundingMode(pointer, rm.getValue());
- return new Term(this, termPointer);
- }
-
- private native long mkRoundingMode(long pointer, int rm);
-
- /**
- * Create a floating-point constant.
- * @param exp Size of the exponent
- * @param sig Size of the significand
- * @param val Value of the floating-point constant as a bit-vector term
- * @throws CVC5ApiException
- */
- public Term mkFloatingPoint(int exp, int sig, Term val) throws CVC5ApiException
- {
- Utils.validateUnsigned(exp, "exp");
- Utils.validateUnsigned(sig, "sig");
- long termPointer = mkFloatingPoint(pointer, exp, sig, val.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkFloatingPoint(long pointer, int exp, int sig, long valPointer);
-
- /**
- * Create a cardinality constraint for an uninterpreted sort.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param sort the sort the cardinality constraint is for
- * @param upperBound the upper bound on the cardinality of the sort
- * @return the cardinality constraint
- * @throws CVC5ApiException
- */
- public Term mkCardinalityConstraint(Sort sort, int upperBound) throws CVC5ApiException
- {
- Utils.validateUnsigned(upperBound, "upperBound");
- long termPointer = mkCardinalityConstraint(pointer, sort.getPointer(), upperBound);
- return new Term(this, termPointer);
- }
-
- private native long mkCardinalityConstraint(long pointer, long sortPointer, int upperBound);
-
- /* .................................................................... */
- /* Create Variables */
- /* .................................................................... */
-
- /**
- * Create (first-order) constant (0-arity function symbol).
- * SMT-LIB:
- * {@code
- * ( declare-const <symbol> <sort> )
- * ( declare-fun <symbol> ( ) <sort> )
- * }
- *
- * @param sort the sort of the constant
- * @param symbol the name of the constant
- * @return the first-order constant
- */
- public Term mkConst(Sort sort, String symbol)
- {
- long termPointer = mkConst(pointer, sort.getPointer(), symbol);
- return new Term(this, termPointer);
- }
-
- private native long mkConst(long pointer, long sortPointer, String symbol);
-
- /**
- * Create (first-order) constant (0-arity function symbol), with a default
- * symbol name.
- *
- * @param sort the sort of the constant
- * @return the first-order constant
- */
- public Term mkConst(Sort sort)
- {
- long termPointer = mkConst(pointer, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long mkConst(long pointer, long sortPointer);
-
- /**
- * Create a bound variable to be used in a binder (i.e. a quantifier, a
- * lambda, or a witness binder).
- * @param sort the sort of the variable
- * @return the variable
- */
- public Term mkVar(Sort sort)
- {
- return mkVar(sort, "");
- }
-
- /**
- * Create a bound variable to be used in a binder (i.e. a quantifier, a
- * lambda, or a witness binder).
- * @param sort the sort of the variable
- * @param symbol the name of the variable
- * @return the variable
- */
- public Term mkVar(Sort sort, String symbol)
- {
- long termPointer = mkVar(pointer, sort.getPointer(), symbol);
- return new Term(this, termPointer);
- }
-
- private native long mkVar(long pointer, long sortPointer, String symbol);
-
- /* .................................................................... */
- /* Create datatype constructor declarations */
- /* .................................................................... */
-
- /**
- * Create a datatype constructor declaration.
- * @param name the name of the datatype constructor
- * @return the DatatypeConstructorDecl
- */
- public DatatypeConstructorDecl mkDatatypeConstructorDecl(String name)
- {
- long declPointer = mkDatatypeConstructorDecl(pointer, name);
- return new DatatypeConstructorDecl(this, declPointer);
- }
-
- private native long mkDatatypeConstructorDecl(long pointer, String name);
-
- /* .................................................................... */
- /* Create datatype declarations */
- /* .................................................................... */
-
- /**
- * Create a datatype declaration.
- * @param name the name of the datatype
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name)
- {
- return mkDatatypeDecl(name, false);
- }
-
- /**
- * Create a datatype declaration.
- * @param name the name of the datatype
- * @param isCoDatatype true if a codatatype is to be constructed
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, boolean isCoDatatype)
- {
- long declPointer = mkDatatypeDecl(pointer, name, isCoDatatype);
- return new DatatypeDecl(this, declPointer);
- }
-
- private native long mkDatatypeDecl(long pointer, String name, boolean isCoDatatype);
-
- /**
- * Create a datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param param the sort parameter
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, Sort param)
- {
- return mkDatatypeDecl(name, param, false);
- }
-
- /**
- * Create a datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param param the sort parameter
- * @param isCoDatatype true if a codatatype is to be constructed
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, Sort param, boolean isCoDatatype)
- {
- long declPointer = mkDatatypeDecl(pointer, name, param.getPointer(), isCoDatatype);
- return new DatatypeDecl(this, declPointer);
- }
-
- private native long mkDatatypeDecl(
- long pointer, String name, long paramPointer, boolean isCoDatatype);
-
- /**
- * Create a datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param params a list of sort parameters
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, List<Sort> params)
- {
- return mkDatatypeDecl(name, params.toArray(new Sort[0]));
- }
-
- /**
- * Create a datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param params a list of sort parameters
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, Sort[] params)
- {
- return mkDatatypeDecl(name, params, false);
- }
-
- /**
- * Create a datatype declaration.
- * Create sorts parameter with Solver::mkParamSort().
- * @param name the name of the datatype
- * @param params a list of sort parameters
- * @param isCoDatatype true if a codatatype is to be constructed
- * @return the DatatypeDecl
- */
- public DatatypeDecl mkDatatypeDecl(String name, Sort[] params, boolean isCoDatatype)
- {
- long[] paramPointers = Utils.getPointers(params);
- long declPointer = mkDatatypeDecl(pointer, name, paramPointers, isCoDatatype);
- return new DatatypeDecl(this, declPointer);
- }
-
- private native long mkDatatypeDecl(
- long pointer, String name, long[] paramPointers, boolean isCoDatatype);
-
- /* .................................................................... */
- /* Formula Handling */
- /* .................................................................... */
-
- /**
- * Simplify a formula without doing "much" work. Does not involve
- * the SAT Engine in the simplification, but uses the current
- * definitions, assertions, and the current partial model, if one
- * has been constructed. It also involves theory normalization.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param t the formula to simplify
- * @return the simplified formula
- */
- public Term simplify(Term t)
- {
- long termPointer = simplify(pointer, t.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long simplify(long pointer, long termPointer);
-
- /**
- * Assert a formula.
- * SMT-LIB:
- * {@code
- * ( assert <term> )
- * }
- * @param term the formula to assert
- */
- public void assertFormula(Term term)
- {
- assertFormula(pointer, term.getPointer());
- }
-
- private native void assertFormula(long pointer, long termPointer);
-
- /**
- * Check satisfiability.
- * SMT-LIB:
- * {@code
- * ( check-sat )
- * }
- * @return the result of the satisfiability check.
- */
- public Result checkSat()
- {
- long resultPointer = checkSat(pointer);
- return new Result(this, resultPointer);
- }
-
- private native long checkSat(long pointer);
- /**
- * Check satisfiability assuming the given formula.
- * SMT-LIB:
- * {@code
- * ( check-sat-assuming ( <prop_literal> ) )
- * }
- * @param assumption the formula to assume
- * @return the result of the satisfiability check.
- */
- public Result checkSatAssuming(Term assumption)
- {
- long resultPointer = checkSatAssuming(pointer, assumption.getPointer());
- return new Result(this, resultPointer);
- }
-
- private native long checkSatAssuming(long pointer, long assumptionPointer);
-
- /**
- * Check satisfiability assuming the given formulas.
- * SMT-LIB:
- * {@code
- * ( check-sat-assuming ( <prop_literal>+ ) )
- * }
- * @param assumptions the formulas to assume
- * @return the result of the satisfiability check.
- */
- public Result checkSatAssuming(Term[] assumptions)
- {
- long[] pointers = Utils.getPointers(assumptions);
- long resultPointer = checkSatAssuming(pointer, pointers);
- return new Result(this, resultPointer);
- }
-
- private native long checkSatAssuming(long pointer, long[] assumptionPointers);
-
- /**
- * Create datatype sort.
- * SMT-LIB:
- * {@code
- * ( declare-datatype <symbol> <datatype_decl> )
- * }
- * @param symbol the name of the datatype sort
- * @param ctors the constructor declarations of the datatype sort
- * @return the datatype sort
- */
- public Sort declareDatatype(String symbol, DatatypeConstructorDecl[] ctors)
- {
- long[] pointers = Utils.getPointers(ctors);
- long sortPointer = declareDatatype(pointer, symbol, pointers);
- return new Sort(this, sortPointer);
- }
-
- private native long declareDatatype(long pointer, String symbol, long[] declPointers);
-
- /**
- * Declare n-ary function symbol.
- * SMT-LIB:
- * {@code
- * ( declare-fun <symbol> ( <sort>* ) <sort> )
- * }
- * @param symbol the name of the function
- * @param sorts the sorts of the parameters to this function
- * @param sort the sort of the return value of this function
- * @return the function
- */
- public Term declareFun(String symbol, Sort[] sorts, Sort sort)
- {
- long[] sortPointers = Utils.getPointers(sorts);
- long termPointer = declareFun(pointer, symbol, sortPointers, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long declareFun(
- long pointer, String symbol, long[] sortPointers, long sortPointer);
-
- /**
- * Declare uninterpreted sort.
- * SMT-LIB:
- * {@code
- * ( declare-sort <symbol> <numeral> )
- * }
- *
- * @apiNote This corresponds to mkUninterpretedSort() const if arity = 0, and
- * to mkUninterpretedSortConstructorSort() const if arity > 0.
- *
- * @param symbol the name of the sort
- * @param arity the arity of the sort
- * @return the sort
- * @throws CVC5ApiException
- */
- public Sort declareSort(String symbol, int arity) throws CVC5ApiException
- {
- Utils.validateUnsigned(arity, "arity");
- long sortPointer = declareSort(pointer, symbol, arity);
- return new Sort(this, sortPointer);
- }
-
- private native long declareSort(long pointer, String symbol, int arity);
-
- /**
- * Define n-ary function in the current context.
- * SMT-LIB:
- * {@code
- * ( define-fun <function_def> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @param term the function body
- * @return the function
- */
- public Term defineFun(String symbol, Term[] boundVars, Sort sort, Term term)
- {
- return defineFun(symbol, boundVars, sort, term, false);
- }
-
- /**
- * Define n-ary function.
- * SMT-LIB:
- * {@code
- * ( define-fun <function_def> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @param term the function body
- * @param global determines whether this definition is global (i.e. persists
- * when popping the context)
- * @return the function
- */
- public Term defineFun(String symbol, Term[] boundVars, Sort sort, Term term, boolean global)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer =
- defineFun(pointer, symbol, boundVarPointers, sort.getPointer(), term.getPointer(), global);
- return new Term(this, termPointer);
- }
-
- private native long defineFun(long pointer,
- String symbol,
- long[] boundVarPointers,
- long sortPointer,
- long termPointer,
- boolean global);
-
- /**
- * Define recursive function in the current context.
- * SMT-LIB:
- * {@code
- * ( define-fun-rec <function_def> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @param term the function body
- * @return the function
- */
- public Term defineFunRec(String symbol, Term[] boundVars, Sort sort, Term term)
- {
- return defineFunRec(symbol, boundVars, sort, term, false);
- }
-
- /**
- * Define recursive function.
- * SMT-LIB:
- * {@code
- * ( define-fun-rec <function_def> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @param term the function body
- * @param global determines whether this definition is global (i.e. persists
- * when popping the context)
- * @return the function
- */
- public Term defineFunRec(String symbol, Term[] boundVars, Sort sort, Term term, boolean global)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer = defineFunRec(
- pointer, symbol, boundVarPointers, sort.getPointer(), term.getPointer(), global);
- return new Term(this, termPointer);
- }
-
- private native long defineFunRec(long pointer,
- String symbol,
- long[] boundVarPointers,
- long sortPointer,
- long termPointer,
- boolean global);
-
- /**
- * Define recursive function in the current context.
- * SMT-LIB:
- * {@code
- * ( define-fun-rec <function_def> )
- * }
- * Create parameter 'fun' with mkConst().
- * @param fun the sorted function
- * @param boundVars the parameters to this function
- * @param term the function body
- * @return the function
- */
-
- public Term defineFunRec(Term fun, Term[] boundVars, Term term)
- {
- return defineFunRec(fun, boundVars, term, false);
- }
-
- /**
- * Define recursive function.
- * SMT-LIB:
- * {@code
- * ( define-fun-rec <function_def> )
- * }
- * Create parameter 'fun' with mkConst().
- * @param fun the sorted function
- * @param boundVars the parameters to this function
- * @param term the function body
- * @param global determines whether this definition is global (i.e. persists
- * when popping the context)
- * @return the function
- */
- public Term defineFunRec(Term fun, Term[] boundVars, Term term, boolean global)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer =
- defineFunRec(pointer, fun.getPointer(), boundVarPointers, term.getPointer(), global);
- return new Term(this, termPointer);
- }
-
- private native long defineFunRec(
- long pointer, long funPointer, long[] boundVarPointers, long termPointer, boolean global);
-
- /**
- * Define recursive functions in the current context.
- * SMT-LIB:
- * {@code
- * ( define-funs-rec ( <function_decl>^{n+1} ) ( <term>^{n+1} ) )
- * }
- * Create elements of parameter 'funs' with mkConst().
- * @param funs the sorted functions
- * @param boundVars the list of parameters to the functions
- * @param terms the list of function bodies of the functions
- */
- public void defineFunsRec(Term[] funs, Term[][] boundVars, Term[] terms)
- {
- defineFunsRec(funs, boundVars, terms, false);
- }
- /**
- * Define recursive functions.
- * SMT-LIB:
- * {@code
- * ( define-funs-rec ( <function_decl>^{n+1} ) ( <term>^{n+1} ) )
- * }
- * Create elements of parameter 'funs' with mkConst().
- * @param funs the sorted functions
- * @param boundVars the list of parameters to the functions
- * @param terms the list of function bodies of the functions
- * @param global determines whether this definition is global (i.e. persists
- * when popping the context)
- */
- public void defineFunsRec(Term[] funs, Term[][] boundVars, Term[] terms, boolean global)
- {
- long[] funPointers = Utils.getPointers(funs);
- long[][] boundVarPointers = Utils.getPointers(boundVars);
- long[] termPointers = Utils.getPointers(terms);
- defineFunsRec(pointer, funPointers, boundVarPointers, termPointers, global);
- }
-
- private native void defineFunsRec(long pointer,
- long[] funPointers,
- long[][] boundVarPointers,
- long[] termPointers,
- boolean global);
-
- /**
- * Get a list of literals that are entailed by the current set of assertions
- * SMT-LIB:
- * {@code
- * ( get-learned-literals )
- * }
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return the list of learned literals
- */
- public Term[] getLearnedLiterals()
- {
- long[] retPointers = getLearnedLiterals(pointer);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getLearnedLiterals(long pointer);
-
- /**
- * Get the list of asserted formulas.
- * SMT-LIB:
- * {@code
- * ( get-assertions )
- * }
- * @return the list of asserted formulas
- */
- public Term[] getAssertions()
- {
- long[] retPointers = getAssertions(pointer);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getAssertions(long pointer);
-
- /**
- * Get info from the solver.
- * SMT-LIB: {@code ( get-info <info_flag> ) }
- * @return the info
- */
- public String getInfo(String flag)
- {
- return getInfo(pointer, flag);
- }
-
- private native String getInfo(long pointer, String flag);
-
- /**
- * Get the value of a given option.
- * SMT-LIB:
- * {@code
- * ( get-option <keyword> )
- * }
- * @param option the option for which the value is queried
- * @return a string representation of the option value
- */
- public String getOption(String option)
- {
- return getOption(pointer, option);
- }
-
- private native String getOption(long pointer, String option);
-
- /**
- * Get all option names that can be used with `setOption`, `getOption` and
- * `getOptionInfo`.
- * @return all option names
- */
- public String[] getOptionNames()
- {
- return getOptionNames(pointer);
- }
-
- private native String[] getOptionNames(long pointer);
-
- /**
- * Get some information about the given option. Check the `OptionInfo` class
- * for more details on which information is available.
- * @return information about the given option
- */
- public OptionInfo getOptionInfo(String option)
- {
- long optionPointer = getOptionInfo(pointer, option);
- return new OptionInfo(this, optionPointer);
- }
-
- private native long getOptionInfo(long pointer, String option);
-
- /**
- * Get the set of unsat ("failed") assumptions.
- * SMT-LIB:
- * {@code
- * ( get-unsat-assumptions )
- * }
- * Requires to enable option 'produce-unsat-assumptions'.
- * @return the set of unsat assumptions.
- */
- public Term[] getUnsatAssumptions()
- {
- long[] retPointers = getUnsatAssumptions(pointer);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getUnsatAssumptions(long pointer);
-
- /**
- * Get the unsatisfiable core.
- * SMT-LIB:
- * {@code
- * (get-unsat-core)
- * }
- * Requires to enable option 'produce-unsat-cores'.
- *
- * @apiNote In contrast to SMT-LIB, the API does not distinguish between
- * named and unnamed assertions when producing an unsatisfiable
- * core. Additionally, the API allows this option to be called after
- * a check with assumptions. A subset of those assumptions may be
- * included in the unsatisfiable core returned by this method.
- *
- * @return a set of terms representing the unsatisfiable core
- */
- public Term[] getUnsatCore()
- {
- long[] retPointers = getUnsatCore(pointer);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getUnsatCore(long pointer);
-
- /**
- * Get a difficulty estimate for an asserted formula. This method is
- * intended to be called immediately after any response to a checkSat.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return a map from (a subset of) the input assertions to a real value that
- * is an estimate of how difficult each assertion was to solve. Unmentioned
- * assertions can be assumed to have zero difficulty.
- */
- public Map<Term, Term> getDifficulty()
- {
- Map<Long, Long> map = getDifficulty(pointer);
- Map<Term, Term> ret = new HashMap<>();
- for (Map.Entry<Long, Long> entry : map.entrySet())
- {
- Term key = new Term(this, entry.getKey());
- Term value = new Term(this, entry.getValue());
- ret.put(key, value);
- }
- return ret;
- }
-
- private native Map<Long, Long> getDifficulty(long pointer);
-
- /**
- * Get the refutation proof
- * SMT-LIB:
- * {@code
- * ( get-proof )
- * }
- * Requires to enable option 'produce-proofs'.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return a string representing the proof, according to the value of
- * proof-format-mode.
- */
- public String getProof()
- {
- return getProof(pointer);
- }
-
- private native String getProof(long pointer);
-
- /**
- * Get the value of the given term in the current model.
- * SMT-LIB:
- * {@code
- * ( get-value ( <term> ) )
- * }
- * @param term the term for which the value is queried
- * @return the value of the given term
- */
- public Term getValue(Term term)
- {
- long termPointer = getValue(pointer, term.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long getValue(long pointer, long termPointer);
-
- /**
- * Get the values of the given terms in the current model.
- * SMT-LIB:
- * {@code
- * ( get-value ( <term>+ ) )
- * }
- * @param terms the terms for which the value is queried
- * @return the values of the given terms
- */
- public Term[] getValue(Term[] terms)
- {
- long[] pointers = Utils.getPointers(terms);
- long[] retPointers = getValue(pointer, pointers);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getValue(long pointer, long[] termPointers);
-
- /**
- * Get the domain elements of uninterpreted sort s in the current model. The
- * current model interprets s as the finite sort whose domain elements are
- * given in the return value of this method.
- *
- * @param s The uninterpreted sort in question
- * @return the domain elements of s in the current model
- */
- public Term[] getModelDomainElements(Sort s)
- {
- long[] pointers = getModelDomainElements(pointer, s.getPointer());
- return Utils.getTerms(this, pointers);
- }
-
- private native long[] getModelDomainElements(long pointer, long sortPointer);
-
- /**
- * This returns false if the model value of free constant v was not essential
- * for showing the satisfiability of the last call to checkSat using the
- * current model. This method will only return false (for any v) if
- * the model-cores option has been set.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param v The term in question
- * @return true if v is a model core symbol
- */
- public boolean isModelCoreSymbol(Term v)
- {
- return isModelCoreSymbol(pointer, v.getPointer());
- }
-
- private native boolean isModelCoreSymbol(long pointer, long termPointer);
-
- /**
- * Get the model
- * SMT-LIB:
- * {@code
- * ( get-model )
- * }
- * Requires to enable option 'produce-models'.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param sorts The list of uninterpreted sorts that should be printed in the
- * model.
- * @param vars The list of free constants that should be printed in the
- * model. A subset of these may be printed based on isModelCoreSymbol.
- * @return a string representing the model.
- */
- public String getModel(Sort[] sorts, Term[] vars)
- {
- long[] sortPointers = Utils.getPointers(sorts);
- long[] varPointers = Utils.getPointers(vars);
- return getModel(pointer, sortPointers, varPointers);
- }
-
- private native String getModel(long pointer, long[] sortPointers, long[] varPointers);
-
- /**
- * Do quantifier elimination.
- * SMT-LIB:
- * {@code
- * ( get-qe <q> )
- * }
- * Quantifier Elimination is is only complete for logics such as LRA,
- * LIA and BV.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param q a quantified formula of the form:
- * Q x1...xn. P( x1...xn, y1...yn )
- * where P( x1...xn, y1...yn ) is a quantifier-free formula
- * @return a formula ret such that, given the current set of formulas A
- * asserted to this solver:
- * - ( A ^ q ) and ( A ^ ret ) are equivalent
- * - ret is quantifier-free formula containing only free variables in
- * y1...yn.
- */
- public Term getQuantifierElimination(Term q)
- {
- long termPointer = getQuantifierElimination(pointer, q.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long getQuantifierElimination(long pointer, long qPointer);
-
- /**
- * Do partial quantifier elimination, which can be used for incrementally
- * computing the result of a quantifier elimination.
- * SMT-LIB:
- * {@code
- * ( get-qe-disjunct <q> )
- * }
- * Quantifier Elimination is is only complete for logics such as LRA,
- * LIA and BV.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param q a quantified formula of the form:
- * Q x1...xn. P( x1...xn, y1...yn )
- * where P( x1...xn, y1...yn ) is a quantifier-free formula
- * @return a formula ret such that, given the current set of formulas A
- * asserted to this solver:
- * - {@code (A ^ q) => (A ^ ret)} if Q is forall or {@code (A ^ ret) => (A ^ q)} if Q is
- * exists,
- * - ret is quantifier-free formula containing only free variables in
- * y1...yn,
- * - If Q is exists, let A^Q_n be the formula
- * {@code A ^ ~ret^Q_1 ^ ... ^ ~ret^Q_n}
- * where for each i=1,...n, formula ret^Q_i is the result of calling
- * getQuantifierEliminationDisjunct for q with the set of assertions
- * {@code A^Q_{i-1}}. Similarly, if Q is forall, then let {@code A^Q_n} be
- * {@code A ^ ret^Q_1 ^ ... ^ ret^Q_n }
- * where ret^Q_i is the same as above. In either case, we have
- * that ret^Q_j will eventually be true or false, for some finite j.
- */
- public Term getQuantifierEliminationDisjunct(Term q)
- {
- long termPointer = getQuantifierEliminationDisjunct(pointer, q.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long getQuantifierEliminationDisjunct(long pointer, long qPointer);
-
- /**
- * When using separation logic, this sets the location sort and the
- * datatype sort to the given ones. This method should be invoked exactly
- * once, before any separation logic constraints are provided.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param locSort The location sort of the heap
- * @param dataSort The data sort of the heap
- */
- public void declareSepHeap(Sort locSort, Sort dataSort)
- {
- declareSepHeap(pointer, locSort.getPointer(), dataSort.getPointer());
- }
-
- private native void declareSepHeap(long pointer, long locSortPointer, long dataSortPointer);
-
- /**
- * When using separation logic, obtain the term for the heap.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return The term for the heap
- */
- public Term getValueSepHeap()
- {
- long termPointer = getValueSepHeap(pointer);
- return new Term(this, termPointer);
- }
-
- private native long getValueSepHeap(long pointer);
-
- /**
- * When using separation logic, obtain the term for nil.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return The term for nil
- */
- public Term getValueSepNil()
- {
- long termPointer = getValueSepNil(pointer);
- return new Term(this, termPointer);
- }
-
- private native long getValueSepNil(long pointer);
-
- /**
- * Declare a symbolic pool of terms with the given initial value.
- * SMT-LIB:
- * {@code
- * ( declare-pool <symbol> <sort> ( <term>* ) )
- * }
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param symbol The name of the pool
- * @param sort The sort of the elements of the pool.
- * @param initValue The initial value of the pool
- */
- public Term declarePool(String symbol, Sort sort, Term[] initValue)
- {
- long[] termPointers = Utils.getPointers(initValue);
- long termPointer = declarePool(pointer, symbol, sort.getPointer(), termPointers);
- return new Term(this, termPointer);
- }
-
- private native long declarePool(
- long pointer, String symbol, long sortPointer, long[] termPointers);
-
- /**
- * Pop a level from the assertion stack.
- * SMT-LIB:
- * {@code
- * ( pop <numeral> )
- * }
- * @throws CVC5ApiException
- */
- public void pop() throws CVC5ApiException
- {
- pop(1);
- }
-
- /**
- * Pop (a) level(s) from the assertion stack.
- * SMT-LIB:
- * {@code
- * ( pop <numeral> )
- * }
- * @param nscopes the number of levels to pop
- * @throws CVC5ApiException
- */
- public void pop(int nscopes) throws CVC5ApiException
- {
- Utils.validateUnsigned(nscopes, "nscopes");
- pop(pointer, nscopes);
- }
-
- private native void pop(long pointer, int nscopes);
-
- /**
- * Get an interpolant
- * SMT-LIB:
- * {@code
- * ( get-interpolant <conj> )
- * }
- * Requires 'produce-interpolants' to be set to a mode different from 'none'.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param conj the conjecture term
- * @return a Term I such that {@code A->I} and {@code I->B} are valid, where
- * A is the current set of assertions and B is given in the input by
- * conj, or the null term if such a term cannot be found.
- */
- public Term getInterpolant(Term conj)
- {
- long interpolPtr = getInterpolant(pointer, conj.getPointer());
- return new Term(this, interpolPtr);
- }
-
- private native long getInterpolant(long pointer, long conjPointer);
-
- /**
- * Get an interpolant
- * SMT-LIB:
- * {@code
- * ( get-interpolant <conj> <g> )
- * }
- * Requires 'produce-interpolants' to be set to a mode different from 'none'.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param conj the conjecture term
- * @param grammar the grammar for the interpolant I
- * @return a Term I such that {@code A->I} and {@code I->B} are valid, where
- * A is the current set of assertions and B is given in the input by
- * conj, or the null term if such a term cannot be found.
- */
- public Term getInterpolant(Term conj, Grammar grammar)
- {
- long interpolPtr = getInterpolant(pointer, conj.getPointer(), grammar.getPointer());
- return new Term(this, interpolPtr);
- }
-
- private native long getInterpolant(long pointer, long conjPointer, long grammarPointer);
-
- /**
- * Get the next interpolant. Can only be called immediately after a successful
- * call to get-interpolant or get-interpolant-next. Is guaranteed to produce a
- * syntactically different interpolant wrt the last returned interpolant if
- * successful.
- *
- * SMT-LIB:
- *
- * \verbatim embed:rst:leading-asterisk
- * .. code:: smtlib
- *
- * (get-interpolant-next)
- *
- * Requires to enable incremental mode, and option 'produce-interpolants' to be
- * set to a mode different from 'none'.
- * \endverbatim
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return a Term I such that {@code A->I} and {@code I->B} are valid,
- * where A is the current set of assertions and B is given in the input
- * by conj on the last call to getInterpolant, or the null term if such
- * a term cannot be found.
- */
- public Term getInterpolantNext()
- {
- long interpolPtr = getInterpolantNext(pointer);
- return new Term(this, interpolPtr);
- }
-
- private native long getInterpolantNext(long pointer);
-
- /**
- * Get an abduct.
- * SMT-LIB:
- * {@code
- * ( get-abduct <conj> )
- * }
- * Requires enabling option 'produce-abducts'
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param conj the conjecture term
- * @return a term C such that A^C is satisfiable, and A^~B^C is
- * unsatisfiable, where A is the current set of assertions and B is
- * given in the input by conj, or the null term if such a term cannot
- * be found.
- */
- public Term getAbduct(Term conj)
- {
- long abdPtr = getAbduct(pointer, conj.getPointer());
- return new Term(this, abdPtr);
- }
-
- private native long getAbduct(long pointer, long conjPointer);
- /**
- * Get an abduct.
- * SMT-LIB:
- * {@code
- * ( get-abduct <conj> <g> )
- * }
- * Requires enabling option 'produce-abducts'
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param conj the conjecture term
- * @param grammar the grammar for the abduct C
- * @return a term C such that A^C is satisfiable, and A^~B^C is
- * unsatisfiable, where A is the current set of assertions and B is
- * given in the input by conj, or the null term if such a term cannot
- * be found.
- */
- public Term getAbduct(Term conj, Grammar grammar)
- {
- long abdPtr = getAbduct(pointer, conj.getPointer(), grammar.getPointer());
- return new Term(this, abdPtr);
- }
-
- private native long getAbduct(long pointer, long conjPointer, long grammarPointer);
-
- /**
- * Get the next abduct. Can only be called immediately after a successful
- * call to get-abduct or get-abduct-next. Is guaranteed to produce a
- * syntactically different abduct wrt the last returned abduct if successful.
- * SMT-LIB:
- * {@code
- * ( get-abduct-next )
- * }
- * Requires enabling incremental mode and option 'produce-abducts'
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return a term C such that A^C is satisfiable, and A^~B^C is
- * unsatisfiable, where A is the current set of assertions and B is
- * given in the input by conj in the last call to getAbduct, or the
- * null term if such a term cannot be found.
- */
- public Term getAbductNext()
- {
- long abdPtr = getAbductNext(pointer);
- return new Term(this, abdPtr);
- }
-
- private native long getAbductNext(long pointer);
-
- /**
- * Block the current model. Can be called only if immediately preceded by a
- * SAT or INVALID query.
- * SMT-LIB:
- * {@code
- * ( block-model )
- * }
- * Requires enabling 'produce-models' option and setting 'block-models' option
- * to a mode other than "none".
- *
- * @apiNote This method is experimental and may change in future versions.
- */
- public void blockModel()
- {
- blockModel(pointer);
- }
-
- private native void blockModel(long pointer);
-
- /**
- * Block the current model values of (at least) the values in terms. Can be
- * called only if immediately preceded by a SAT or NOT_ENTAILED query.
- * SMT-LIB:
- * {@code
- * ( block-model-values ( <terms>+ ) )
- * }
- * Requires enabling 'produce-models' option.
- *
- * @apiNote This method is experimental and may change in future versions.
- */
- public void blockModelValues(Term[] terms)
- {
- long[] pointers = Utils.getPointers(terms);
- blockModelValues(pointer, pointers);
- }
-
- private native void blockModelValues(long pointer, long[] termPointers);
-
- /**
- * Return a string that contains information about all instantiations made by
- * the quantifiers module.
- *
- * @apiNote This method is experimental and may change in future versions.
- */
- public String getInstantiations()
- {
- return getInstantiations(pointer);
- }
-
- private native String getInstantiations(long pointer);
-
- /**
- * Push a level to the assertion stack.
- * SMT-LIB:
- * {@code
- * ( push <numeral> )
- * }
- * @throws CVC5ApiException
- */
- public void push() throws CVC5ApiException
- {
- push(1);
- }
-
- /**
- * Push (a) level(s) to the assertion stack.
- * SMT-LIB:
- * {@code
- * ( push <numeral> )
- * }
- * @param nscopes the number of levels to push
- * @throws CVC5ApiException
- */
- public void push(int nscopes) throws CVC5ApiException
- {
- Utils.validateUnsigned(nscopes, "nscopes");
- push(pointer, nscopes);
- }
-
- private native void push(long pointer, int nscopes);
-
- /**
- * Remove all assertions.
- * SMT-LIB:
- * {@code
- * ( reset-assertions )
- * }
- */
- public void resetAssertions()
- {
- resetAssertions(pointer);
- }
-
- private native void resetAssertions(long pointer);
-
- /**
- * Set info.
- * SMT-LIB:
- * {@code
- * ( set-info <attribute> )
- * }
- * @param keyword the info flag
- * @param value the value of the info flag
- * @throws CVC5ApiException
- */
- public void setInfo(String keyword, String value) throws CVC5ApiException
- {
- setInfo(pointer, keyword, value);
- }
-
- private native void setInfo(long pointer, String keyword, String value) throws CVC5ApiException;
-
- /**
- * Set logic.
- * SMT-LIB:
- * {@code
- * ( set-logic <symbol> )
- * }
- * @param logic the logic to set
- * @throws CVC5ApiException
- */
- public void setLogic(String logic) throws CVC5ApiException
- {
- setLogic(pointer, logic);
- }
-
- private native void setLogic(long pointer, String logic) throws CVC5ApiException;
-
- /**
- * Set option.
- * SMT-LIB:
- * {@code
- * ( set-option <option> )
- * }
- * @param option the option name
- * @param value the option value
- */
- public void setOption(String option, String value)
- {
- setOption(pointer, option, value);
- }
-
- private native void setOption(long pointer, String option, String value);
-
- /**
- * Append \p symbol to the current list of universal variables.
- * @param sort the sort of the universal variable
- * @return the universal variable
- */
- public Term declareSygusVar(Sort sort)
- {
- return declareSygusVar(sort, "");
- }
- /**
- * Append \p symbol to the current list of universal variables.
- * SyGuS v2:
- * {@code
- * ( declare-var <symbol> <sort> )
- * }
- * @param sort the sort of the universal variable
- * @param symbol the name of the universal variable
- * @return the universal variable
- */
- public Term declareSygusVar(Sort sort, String symbol)
- {
- long termPointer = declareSygusVar(pointer, sort.getPointer(), symbol);
- return new Term(this, termPointer);
- }
-
- private native long declareSygusVar(long pointer, long sortPointer, String symbol);
-
- /**
- * Create a Sygus grammar. The first non-terminal is treated as the starting
- * non-terminal, so the order of non-terminals matters.
- *
- * @param boundVars the parameters to corresponding synth-fun/synth-inv
- * @param ntSymbols the pre-declaration of the non-terminal symbols
- * @return the grammar
- */
- public Grammar mkSygusGrammar(Term[] boundVars, Term[] ntSymbols)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long[] ntSymbolPointers = Utils.getPointers(ntSymbols);
- long grammarPointer = mkSygusGrammar(pointer, boundVarPointers, ntSymbolPointers);
- return new Grammar(this, grammarPointer);
- }
-
- private native long mkSygusGrammar(
- long pointer, long[] boundVarPointers, long[] ntSymbolPointers);
-
- /**
- * Synthesize n-ary function.
- * SyGuS v2:
- * {@code
- * ( synth-fun <symbol> ( <boundVars>* ) <sort> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @return the function
- */
- public Term synthFun(String symbol, Term[] boundVars, Sort sort)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer = synthFun(pointer, symbol, boundVarPointers, sort.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long synthFun(
- long pointer, String symbol, long[] boundVarPointers, long sortPointer);
-
- /**
- * Synthesize n-ary function following specified syntactic constraints.
- * SyGuS v2:
- * {@code
- * ( synth-fun <symbol> ( <boundVars>* ) <sort> <g> )
- * }
- * @param symbol the name of the function
- * @param boundVars the parameters to this function
- * @param sort the sort of the return value of this function
- * @param grammar the syntactic constraints
- * @return the function
- */
- public Term synthFun(String symbol, Term[] boundVars, Sort sort, Grammar grammar)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer =
- synthFun(pointer, symbol, boundVarPointers, sort.getPointer(), grammar.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long synthFun(
- long pointer, String symbol, long[] boundVarPointers, long sortPointer, long grammarPointer);
-
- /**
- * Synthesize invariant.
- * SyGuS v2:
- * {@code
- * ( synth-inv <symbol> ( <boundVars>* ) )
- * }
- * @param symbol the name of the invariant
- * @param boundVars the parameters to this invariant
- * @return the invariant
- */
- public Term synthInv(String symbol, Term[] boundVars)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer = synthInv(pointer, symbol, boundVarPointers);
- return new Term(this, termPointer);
- }
-
- private native long synthInv(long pointer, String symbol, long[] boundVarPointers);
-
- /**
- * Synthesize invariant following specified syntactic constraints.
- * SyGuS v2:
- * {@code
- * ( synth-inv <symbol> ( <boundVars>* ) <g> )
- * }
- * @param symbol the name of the invariant
- * @param boundVars the parameters to this invariant
- * @param grammar the syntactic constraints
- * @return the invariant
- */
- public Term synthInv(String symbol, Term[] boundVars, Grammar grammar)
- {
- long[] boundVarPointers = Utils.getPointers(boundVars);
- long termPointer = synthInv(pointer, symbol, boundVarPointers, grammar.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long synthInv(
- long pointer, String symbol, long[] boundVarPointers, long grammarPointer);
-
- /**
- * Add a forumla to the set of Sygus constraints.
- * SyGuS v2:
- * {@code
- * ( constraint <term> )
- * }
- * @param term the formula to add as a constraint
- */
- public void addSygusConstraint(Term term)
- {
- addSygusConstraint(pointer, term.getPointer());
- }
-
- private native void addSygusConstraint(long pointer, long termPointer);
-
- /**
- * Add a forumla to the set of Sygus assumptions.
- * SyGuS v2:
- * {@code
- * ( assume <term> )
- * }
- * @param term the formula to add as an assumption
- */
- public void addSygusAssume(Term term)
- {
- addSygusAssume(pointer, term.getPointer());
- }
-
- private native void addSygusAssume(long pointer, long termPointer);
-
- /**
- * Add a set of Sygus constraints to the current state that correspond to an
- * invariant synthesis problem.
- * SyGuS v2:
- * {@code
- * ( inv-constraint <inv> <pre> <trans> <post> )
- * }
- * @param inv the function-to-synthesize
- * @param pre the pre-condition
- * @param trans the transition relation
- * @param post the post-condition
- */
- public void addSygusInvConstraint(Term inv, Term pre, Term trans, Term post)
- {
- addSygusInvConstraint(
- pointer, inv.getPointer(), pre.getPointer(), trans.getPointer(), post.getPointer());
- }
-
- private native void addSygusInvConstraint(
- long pointer, long invPointer, long prePointer, long transPointer, long postPointer);
-
- /**
- * Try to find a solution for the synthesis conjecture corresponding to the
- * current list of functions-to-synthesize, universal variables and
- * constraints.
- * SyGuS v2:
- * {@code
- * ( check-synth )
- * }
- * @return the result of the check, which is "solution" if the check found a
- * solution in which case solutions are available via
- * getSynthSolutions, "no solution" if it was determined there is no
- * solution, or "unknown" otherwise.
- */
- public SynthResult checkSynth()
- {
- long resultPointer = checkSynth(pointer);
- return new SynthResult(this, resultPointer);
- }
-
- private native long checkSynth(long pointer);
-
- /**
- * Try to find a next solution for the synthesis conjecture corresponding to
- * the current list of functions-to-synthesize, universal variables and
- * constraints. Must be called immediately after a successful call to
- * check-synth or check-synth-next. Requires incremental mode.
- * SyGuS v2:
- * {@code
- * ( check-synth-next )
- * }
- * @return the result of the check, which is "solution" if the check found a
- * solution in which case solutions are available via
- * getSynthSolutions, "no solution" if it was determined there is no
- * solution, or "unknown" otherwise.
- */
- public SynthResult checkSynthNext()
- {
- long resultPointer = checkSynthNext(pointer);
- return new SynthResult(this, resultPointer);
- }
-
- private native long checkSynthNext(long pointer);
-
- /**
- * Get the synthesis solution of the given term. This method should be called
- * immediately after the solver answers unsat for sygus input.
- * @param term the term for which the synthesis solution is queried
- * @return the synthesis solution of the given term
- */
- public Term getSynthSolution(Term term)
- {
- long termPointer = getSynthSolution(pointer, term.getPointer());
- return new Term(this, termPointer);
- }
-
- private native long getSynthSolution(long pointer, long termPointer);
-
- /**
- * Get the synthesis solutions of the given terms. This method should be
- * called immediately after the solver answers unsat for sygus input.
- * @param terms the terms for which the synthesis solutions is queried
- * @return the synthesis solutions of the given terms
- */
- public Term[] getSynthSolutions(Term[] terms)
- {
- long[] termPointers = Utils.getPointers(terms);
- long[] retPointers = getSynthSolutions(pointer, termPointers);
- return Utils.getTerms(this, retPointers);
- }
-
- private native long[] getSynthSolutions(long pointer, long[] termPointers);
-
- /**
- * Returns a snapshot of the current state of the statistic values of this
- * solver. The returned object is completely decoupled from the solver and
- * will not change when the solver is used again.
- */
- public Statistics getStatistics()
- {
- long statisticsPointer = getStatistics(pointer);
- return new Statistics(this, statisticsPointer);
- }
-
- private native long getStatistics(long pointer);
-
- /**
- * @return null term
- */
- public Term getNullTerm()
- {
- long termPointer = getNullTerm(pointer);
- return new Term(this, termPointer);
- }
-
- private native long getNullTerm(long pointer);
-
- /**
- * @return null result
- */
- public Result getNullResult()
- {
- long resultPointer = getNullResult(pointer);
- return new Result(this, resultPointer);
- }
-
- private native long getNullResult(long pointer);
-
- /**
- * @return null synth result
- */
- public SynthResult getNullSynthResult()
- {
- long resultPointer = getNullSynthResult(pointer);
- return new SynthResult(this, resultPointer);
- }
-
- private native long getNullSynthResult(long pointer);
-
- /**
- * @return null op
- */
- public Op getNullOp()
- {
- long opPointer = getNullOp(pointer);
- return new Op(this, opPointer);
- }
-
- private native long getNullOp(long pointer);
-
- /**
- * @return null op
- */
- public DatatypeDecl getNullDatatypeDecl()
- {
- long declPointer = getNullDatatypeDecl(pointer);
- return new DatatypeDecl(this, declPointer);
- }
-
- private native long getNullDatatypeDecl(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.List;
-
-public class Sort extends AbstractPointer implements Comparable<Sort>
-{
- // region construction and destruction
- Sort(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Comparison for structural equality.
- * @param s the sort to compare to
- * @return true if the sorts are equal
- */
- @Override
- public boolean equals(Object s)
- {
- if (this == s)
- return true;
- if (s == null || getClass() != s.getClass())
- return false;
- Sort sort = (Sort) s;
- if (this.pointer == sort.pointer)
- {
- return true;
- }
- return equals(pointer, sort.getPointer());
- }
-
- private native boolean equals(long pointer1, long pointer2);
-
- /**
- * Comparison for ordering on sorts.
- *
- * @param s the sort to compare to
- * @return a negative integer, zero, or a positive integer as this sort
- * is less than, equal to, or greater than the specified sort.
- */
- @Override
- public int compareTo(Sort s)
- {
- return this.compareTo(pointer, s.getPointer());
- }
-
- private native int compareTo(long pointer1, long pointer2);
-
- /**
- * @return true if the sort has a symbol.
- */
- public boolean hasSymbol()
- {
- return hasSymbol(pointer);
- }
-
- private native boolean hasSymbol(long pointer);
-
- /**
- * Asserts hasSymbol().
- * @return the raw symbol of the symbol.
- */
- public String getSymbol()
- {
- return getSymbol(pointer);
- }
-
- private native String getSymbol(long pointer);
-
- /**
- * @return true if this Sort is a null sort.
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * Is this a Boolean sort?
- * @return true if the sort is a Boolean sort
- */
- public boolean isBoolean()
- {
- return isBoolean(pointer);
- }
-
- private native boolean isBoolean(long pointer);
-
- /**
- * Is this a integer sort?
- * @return true if the sort is a integer sort
- */
- public boolean isInteger()
- {
- return isInteger(pointer);
- }
-
- private native boolean isInteger(long pointer);
-
- /**
- * Is this a real sort?
- * @return true if the sort is a real sort
- */
- public boolean isReal()
- {
- return isReal(pointer);
- }
-
- private native boolean isReal(long pointer);
-
- /**
- * Is this a string sort?
- * @return true if the sort is the string sort
- */
- public boolean isString()
- {
- return isString(pointer);
- }
-
- private native boolean isString(long pointer);
-
- /**
- * Is this a regexp sort?
- * @return true if the sort is the regexp sort
- */
- public boolean isRegExp()
- {
- return isRegExp(pointer);
- }
-
- private native boolean isRegExp(long pointer);
-
- /**
- * Is this a rounding mode sort?
- * @return true if the sort is the rounding mode sort
- */
- public boolean isRoundingMode()
- {
- return isRoundingMode(pointer);
- }
-
- private native boolean isRoundingMode(long pointer);
-
- /**
- * Is this a bit-vector sort?
- * @return true if the sort is a bit-vector sort
- */
- public boolean isBitVector()
- {
- return isBitVector(pointer);
- }
-
- private native boolean isBitVector(long pointer);
-
- /**
- * Is this a floating-point sort?
- * @return true if the sort is a floating-point sort
- */
- public boolean isFloatingPoint()
- {
- return isFloatingPoint(pointer);
- }
-
- private native boolean isFloatingPoint(long pointer);
-
- /**
- * Is this a datatype sort?
- * @return true if the sort is a datatype sort
- */
- public boolean isDatatype()
- {
- return isDatatype(pointer);
- }
-
- private native boolean isDatatype(long pointer);
-
- /**
- * Is this a constructor sort?
- * @return true if the sort is a constructor sort
- */
- public boolean isConstructor()
- {
- return isConstructor(pointer);
- }
-
- private native boolean isConstructor(long pointer);
-
- /**
- * Is this a selector sort?
- * @return true if the sort is a selector sort
- */
- public boolean isSelector()
- {
- return isSelector(pointer);
- }
-
- private native boolean isSelector(long pointer);
-
- /**
- * Is this a tester sort?
- * @return true if the sort is a tester sort
- */
- public boolean isTester()
- {
- return isTester(pointer);
- }
-
- private native boolean isTester(long pointer);
-
- /**
- * Is this a datatype updater sort?
- * @return true if the sort is a datatype updater sort
- */
- public boolean isUpdater()
- {
- return isUpdater(pointer);
- }
-
- private native boolean isUpdater(long pointer);
-
- /**
- * Is this a function sort?
- * @return true if the sort is a function sort
- */
- public boolean isFunction()
- {
- return isFunction(pointer);
- }
-
- private native boolean isFunction(long pointer);
-
- /**
- * Is this a predicate sort?
- * That is, is this a function sort mapping to Boolean? All predicate
- * sorts are also function sorts.
- * @return true if the sort is a predicate sort
- */
- public boolean isPredicate()
- {
- return isPredicate(pointer);
- }
-
- private native boolean isPredicate(long pointer);
-
- /**
- * Is this a tuple sort?
- * @return true if the sort is a tuple sort
- */
- public boolean isTuple()
- {
- return isTuple(pointer);
- }
-
- private native boolean isTuple(long pointer);
-
- /**
- * Is this a record sort?
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @return true if the sort is a record sort
- */
- public boolean isRecord()
- {
- return isRecord(pointer);
- }
-
- private native boolean isRecord(long pointer);
-
- /**
- * Is this an array sort?
- * @return true if the sort is a array sort
- */
- public boolean isArray()
- {
- return isArray(pointer);
- }
-
- private native boolean isArray(long pointer);
-
- /**
- * Is this a Set sort?
- * @return true if the sort is a Set sort
- */
- public boolean isSet()
- {
- return isSet(pointer);
- }
-
- private native boolean isSet(long pointer);
-
- /**
- * Is this a Bag sort?
- * @return true if the sort is a Bag sort
- */
- public boolean isBag()
- {
- return isBag(pointer);
- }
-
- private native boolean isBag(long pointer);
-
- /**
- * Is this a Sequence sort?
- * @return true if the sort is a Sequence sort
- */
- public boolean isSequence()
- {
- return isSequence(pointer);
- }
-
- private native boolean isSequence(long pointer);
-
- /**
- * Is this a sort kind?
- * @return true if this is a sort kind
- */
- public boolean isUninterpretedSort()
- {
- return isUninterpretedSort(pointer);
- }
-
- private native boolean isUninterpretedSort(long pointer);
-
- /**
- * Is this an uninterpreted sort constructor kind?
- *
- * An uninterpreted sort constructor is an uninterpreted sort with arity
- * > 0.
- *
- * @return true if this is a sort constructor kind
- */
- public boolean isUninterpretedSortConstructor()
- {
- return isUninterpretedSortConstructor(pointer);
- }
-
- private native boolean isUninterpretedSortConstructor(long pointer);
-
- /**
- * Is this an instantiated (parametric datatype or uninterpreted sort
- * constructor) sort?
- *
- * An instantiated sort is a sort that has been constructed from
- * instantiating a sort with sort arguments
- * (see {@link Sort#instantiate(Sort[])}).
- *
- * @return true if this is an instantiated sort
- */
- public boolean isInstantiated()
- {
- return isInstantiated(pointer);
- }
-
- private native boolean isInstantiated(long pointer);
-
- /**
- * Get the associated uninterpreted sort constructor of an instantiated
- * uninterpreted sort.
- *
- * @return the uninterpreted sort constructor sort
- */
- public Sort getUninterpretedSortConstructor()
- {
- long sortPointer = getUninterpretedSortConstructor(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getUninterpretedSortConstructor(long pointer);
-
- /**
- * @return the underlying datatype of a datatype sort
- */
- public Datatype getDatatype()
- {
- long datatypePointer = getDatatype(pointer);
- return new Datatype(solver, datatypePointer);
- }
-
- private native long getDatatype(long pointer);
-
- /**
- * Instantiate a parameterized datatype sort or uninterpreted sort
- * constructor sort.
- *
- * Create sorts parameter with Solver.mkParamSort().
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param params the list of sort parameters to instantiate with
- * @return the instantiated sort
- */
- public Sort instantiate(List<Sort> params)
- {
- return instantiate(params.toArray(new Sort[0]));
- }
-
- /**
- * Instantiate a parameterized datatype sort or uninterpreted sort
- * constructor sort.
- *
- * Create sorts parameter with Solver.mkParamSort().
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param params the list of sort parameters to instantiate with
- */
- public Sort instantiate(Sort[] params)
- {
- long[] paramsPointers = Utils.getPointers(params);
- long sortPointer = instantiate(pointer, paramsPointers);
- return new Sort(solver, sortPointer);
- }
-
- private native long instantiate(long pointer, long[] paramsPointers);
-
- /**
- * Get the sorts used to instantiate the sort parameters of a parametric
- * sort (parametric datatype or uninterpreted sort constructor sort,
- * see {@link Sort#instantiate(Sort[])}).
- *
- * @return the sorts used to instantiate the sort parameters of a
- * parametric sort
- */
- public Sort[] getInstantiatedParameters()
- {
- long[] pointers = getInstantiatedParameters(pointer);
- return Utils.getSorts(solver, pointers);
- }
-
- private native long[] getInstantiatedParameters(long pointer);
-
- /**
- * Substitution of Sorts.
- *
- * Note that this replacement is applied during a pre-order traversal and
- * only once to the sort. It is not run until fix point.
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param sort the subsort to be substituted within this sort.
- * @param replacement the sort replacing the substituted subsort.
- */
- public Sort substitute(Sort sort, Sort replacement)
- {
- long sortPointer = substitute(pointer, sort.getPointer(), replacement.getPointer());
- return new Sort(solver, sortPointer);
- }
-
- private native long substitute(long pointer, long sortPointer, long replacementPointer);
-
- /**
- * Simultaneous substitution of Sorts.
- *
- * Note that this replacement is applied during a pre-order traversal and
- * only once to the sort. It is not run until fix point. In the case that
- * sorts contains duplicates, the replacement earliest in the list takes
- * priority.
- *
- * For example,
- * (Array A B).substitute({A, C}, {(Array C D), (Array A B)}) will
- * return (Array (Array C D) B).
- *
- * @apiNote This method is experimental and may change in future versions.
- *
- * @param sorts the subsorts to be substituted within this sort.
- * @param replacements the sort replacing the substituted subsorts.
- */
- public Sort substitute(Sort[] sorts, Sort[] replacements)
- {
- long[] sortPointers = Utils.getPointers(sorts);
- long[] replacementPointers = Utils.getPointers(sorts);
- long sortPointer = substitute(pointer, sortPointers, replacementPointers);
- return new Sort(solver, sortPointer);
- }
-
- private native long substitute(long pointer, long[] sortPointers, long[] replacementPointers);
-
- /**
- * Output a string representation of this sort to a given stream.
- * @param out the output stream
- */
- // TODO: do we need to support this?
- // void toStream(std::ostream& out)
-
- /**
- * @return a string representation of this sort
- */
- protected native String toString(long pointer);
-
- /* Constructor sort ------------------------------------------------------- */
-
- /**
- * @return the arity of a constructor sort
- */
- public int getConstructorArity()
- {
- return getConstructorArity(pointer);
- }
-
- private native int getConstructorArity(long pointer);
-
- /**
- * @return the domain sorts of a constructor sort
- */
- public Sort[] getConstructorDomainSorts()
- {
- long[] pointers = getConstructorDomainSorts(pointer);
- return Utils.getSorts(solver, pointers);
- }
-
- private native long[] getConstructorDomainSorts(long pointer);
-
- /**
- * @return the codomain sort of a constructor sort
- */
- public Sort getConstructorCodomainSort()
- {
- long sortPointer = getConstructorCodomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getConstructorCodomainSort(long pointer);
-
- /* Selector sort ------------------------------------------------------- */
-
- /**
- * @return the domain sort of a selector sort
- */
- public Sort getSelectorDomainSort()
- {
- long sortPointer = getSelectorDomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getSelectorDomainSort(long pointer);
-
- /**
- * @return the codomain sort of a selector sort
- */
- public Sort getSelectorCodomainSort()
- {
- long sortPointer = getSelectorCodomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getSelectorCodomainSort(long pointer);
-
- /* Tester sort ------------------------------------------------------- */
-
- /**
- * @return the domain sort of a tester sort
- */
- public Sort getTesterDomainSort()
- {
- long sortPointer = getTesterDomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getTesterDomainSort(long pointer);
-
- /**
- * @return the codomain sort of a tester sort, which is the Boolean sort
- */
- public Sort getTesterCodomainSort()
- {
- long sortPointer = getTesterCodomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getTesterCodomainSort(long pointer);
-
- /* Function sort ------------------------------------------------------- */
-
- /**
- * @return the arity of a function sort
- */
- public int getFunctionArity()
- {
- return getFunctionArity(pointer);
- }
-
- private native int getFunctionArity(long pointer);
-
- /**
- * @return the domain sorts of a function sort
- */
- public Sort[] getFunctionDomainSorts()
- {
- long[] pointers = getFunctionDomainSorts(pointer);
- return Utils.getSorts(solver, pointers);
- }
-
- private native long[] getFunctionDomainSorts(long pointer);
-
- /**
- * @return the codomain sort of a function sort
- */
- public Sort getFunctionCodomainSort()
- {
- long sortPointer = getFunctionCodomainSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getFunctionCodomainSort(long pointer);
-
- /* Array sort ---------------------------------------------------------- */
-
- /**
- * @return the array index sort of an array sort
- */
- public Sort getArrayIndexSort()
- {
- long sortPointer = getArrayIndexSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getArrayIndexSort(long pointer);
-
- /**
- * @return the array element sort of an array element sort
- */
- public Sort getArrayElementSort()
- {
- long sortPointer = getArrayElementSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getArrayElementSort(long pointer);
-
- /* Set sort ------------------------------------------------------------ */
-
- /**
- * @return the element sort of a set sort
- */
- public Sort getSetElementSort()
- {
- long sortPointer = getSetElementSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getSetElementSort(long pointer);
-
- /* Bag sort ------------------------------------------------------------ */
-
- /**
- * @return the element sort of a bag sort
- */
- public Sort getBagElementSort()
- {
- long sortPointer = getBagElementSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getBagElementSort(long pointer);
-
- /* Sequence sort ------------------------------------------------------- */
-
- /**
- * @return the element sort of a sequence sort
- */
- public Sort getSequenceElementSort()
- {
- long sortPointer = getSequenceElementSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getSequenceElementSort(long pointer);
-
- /* Sort constructor sort ----------------------------------------------- */
-
- /**
- * @return the arity of an uninterpreted sort constructor sort
- */
- public int getUninterpretedSortConstructorArity()
- {
- return getUninterpretedSortConstructorArity(pointer);
- }
-
- private native int getUninterpretedSortConstructorArity(long pointer);
-
- /* Bit-vector sort ----------------------------------------------------- */
-
- /**
- * @return the bit-width of the bit-vector sort
- */
- public int getBitVectorSize()
- {
- return getBitVectorSize(pointer);
- }
-
- private native int getBitVectorSize(long pointer);
-
- /* Floating-point sort ------------------------------------------------- */
-
- /**
- * @return the bit-width of the exponent of the floating-point sort
- */
- public int getFloatingPointExponentSize()
- {
- return getFloatingPointExponentSize(pointer);
- }
-
- private native int getFloatingPointExponentSize(long pointer);
-
- /**
- * @return the width of the significand of the floating-point sort
- */
- public int getFloatingPointSignificandSize()
- {
- return getFloatingPointSignificandSize(pointer);
- }
-
- private native int getFloatingPointSignificandSize(long pointer);
-
- /* Datatype sort ------------------------------------------------------- */
-
- /**
- * @return the arity of a datatype sort
- */
- public int getDatatypeArity()
- {
- return getDatatypeArity(pointer);
- }
-
- private native int getDatatypeArity(long pointer);
-
- /* Tuple sort ---------------------------------------------------------- */
-
- /**
- * @return the length of a tuple sort
- */
- public int getTupleLength()
- {
- return getTupleLength(pointer);
- }
-
- private native int getTupleLength(long pointer);
-
- /**
- * @return the element sorts of a tuple sort
- */
- public Sort[] getTupleSorts()
- {
- long[] pointers = getTupleSorts(pointer);
- return Utils.getSorts(solver, pointers);
- }
-
- private native long[] getTupleSorts(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.Map;
-
-/**
- * Represents a snapshot of a single statistic value.
- * A value can be of type {@code long}, {@code double}, {@code String} or a histogram
- * ({@code Map<String, Long>}).
- * The value type can be queried (using {@code isInt()}, {@code isDouble()}, etc.) and
- * the stored value can be accessed (using {@code getInt()}, {@code getDouble()}, etc.).
- * It is possible to query whether this statistic is an internal statistic by
- * {@code isInternal()} and whether its value is the default value by {@code isDefault()}.
- */
-public class Stat extends AbstractPointer
-{
- // region construction and destruction
- Stat(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * @return a string representation of this Stat
- */
- protected native String toString(long pointer);
-
- /**
- * Is this value intended for internal use only?
- * @return Whether this is an internal statistic.
- */
- public boolean isInternal()
- {
- return isInternal(pointer);
- }
-
- private native boolean isInternal(long pointer);
-
- /**
- * Does this value hold the default value?
- * @return Whether this is a defaulted statistic.
- */
- public boolean isDefault()
- {
- return isDefault(pointer);
- }
-
- private native boolean isDefault(long pointer);
-
- /**
- * Is this value an integer?
- * @return Whether the value is an integer.
- */
- public boolean isInt()
- {
- return isInt(pointer);
- }
-
- private native boolean isInt(long pointer);
-
- /**
- * Return the integer value.
- * @return The integer value.
- */
- public long getInt()
- {
- return getInt(pointer);
- }
-
- private native long getInt(long pointer);
-
- /**
- * Is this value a double?
- * @return Whether the value is a double.
- */
- public boolean isDouble()
- {
- return isDouble(pointer);
- }
-
- private native boolean isDouble(long pointer);
-
- /**
- * Return the double value.
- * @return The double value.
- */
- public double getDouble()
- {
- return getDouble(pointer);
- }
-
- private native double getDouble(long pointer);
-
- /**
- * Is this value a string?
- * @return Whether the value is a string.
- */
- public boolean isString()
- {
- return isString(pointer);
- }
-
- private native boolean isString(long pointer);
-
- /**
- * Return the string value.
- * @return The string value.
- */
- public String getString()
- {
- return getString(pointer);
- }
-
- private native String getString(long pointer);
-
- /**
- * Is this value a histogram?
- * @return Whether the value is a histogram.
- */
- public boolean isHistogram()
- {
- return isHistogram(pointer);
- }
-
- private native boolean isHistogram(long pointer);
-
- /**
- * Return the histogram value.
- * @return The histogram value.
- */
- public Map<String, Long> getHistogram()
- {
- return getHistogram(pointer);
- }
-
- private native Map<String, Long> getHistogram(long pointer);
-};
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.util.AbstractMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-
-public class Statistics extends AbstractPointer implements Iterable<Map.Entry<String, Stat>>
-{
- // region construction and destruction
- Statistics(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * @return a string representation of this Statistics
- */
- protected native String toString(long pointer);
-
- /**
- * Retrieve the statistic with the given name.
- * Asserts that a statistic with the given name actually exists and throws
- * a `CVC5ApiRecoverableException` if it does not.
- * @param name Name of the statistic.
- * @return The statistic with the given name.
- */
- public Stat get(String name)
- {
- long statPointer = get(pointer, name);
- return new Stat(solver, statPointer);
- }
-
- private native long get(long pointer, String name);
-
- /**
- * Begin iteration over the statistics values.
- * By default, only entries that are public (non-internal) and have been set
- * are visible while the others are skipped.
- * @param internal If set to true, internal statistics are shown as well.
- * @param defaulted If set to true, defaulted statistics are shown as well.
- */
-
- private native long getIteratorOpts(long pointer, boolean internal, boolean defaulted);
- private native long getIterator(long pointer);
-
- private native boolean hasNext(long pointer, long iteratorPointer);
-
- private native Pair<String, Long> getNext(long pointer, long iteratorPointer)
- throws CVC5ApiException;
-
- private native long increment(long pointer, long iteratorPointer) throws CVC5ApiException;
-
- private native void deleteIteratorPointer(long iteratorPointer);
-
- public class ConstIterator implements Iterator<Map.Entry<String, Stat>>
- {
- private long iteratorPointer = 0;
-
- public ConstIterator(boolean internal, boolean defaulted)
- {
- iteratorPointer = getIteratorOpts(pointer, internal, defaulted);
- }
- public ConstIterator()
- {
- iteratorPointer = getIterator(pointer);
- }
-
- @Override
- public boolean hasNext()
- {
- return Statistics.this.hasNext(pointer, iteratorPointer);
- }
-
- @Override
- public Map.Entry<String, Stat> next()
- {
- try
- {
- Pair<String, Long> pair = Statistics.this.getNext(pointer, iteratorPointer);
- Stat stat = new Stat(solver, pair.second);
- this.iteratorPointer = Statistics.this.increment(pointer, iteratorPointer);
- return new AbstractMap.SimpleImmutableEntry<>(pair.first, stat);
- }
- catch (CVC5ApiException e)
- {
- throw new NoSuchElementException(e.getMessage());
- }
- }
- }
-
- public ConstIterator iterator(boolean internal, boolean defaulted)
- {
- return new ConstIterator(internal, defaulted);
- }
- @Override
- public ConstIterator iterator()
- {
- return new ConstIterator();
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Andrew Reynolds
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class SynthResult extends AbstractPointer
-{
- // region construction and destruction
- SynthResult(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * @return true if SynthResult is empty, i.e., a nullary SynthResult, and not
- * an actual result returned from a synthesis query.
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * @return true if the synthesis query has a solution.
- */
- public boolean hasSolution()
- {
- return hasSolution(pointer);
- }
-
- private native boolean hasSolution(long pointer);
-
- /**
- * @return true if the synthesis query has no solution. In this case, it was
- * determined there was no solution.
- */
- public boolean hasNoSolution()
- {
- return hasNoSolution(pointer);
- }
-
- private native boolean hasNoSolution(long pointer);
-
- /**
- * @return true if the result of the synthesis query could not be determined.
- */
- public boolean isUnknown()
- {
- return isUnknown(pointer);
- }
-
- private native boolean isUnknown(long pointer);
-
- /**
- * @return a string representation of this result.
- */
- protected native String toString(long pointer);
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Aina Niemetz, Andrew Reynolds, Abdalrhman Mohamed, Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.math.BigInteger;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-public class Term extends AbstractPointer implements Comparable<Term>, Iterable<Term>
-{
- // region construction and destruction
- Term(Solver solver, long pointer)
- {
- super(solver, pointer);
- }
-
- protected native void deletePointer(long pointer);
-
- public long getPointer()
- {
- return pointer;
- }
-
- // endregion
-
- /**
- * Syntactic equality operator.
- * Return true if both terms are syntactically identical.
- * Both terms must belong to the same solver object.
- *
- * @param t the term to compare to for equality
- * @return true if the terms are equal
- */
- @Override
- public boolean equals(Object t)
- {
- if (this == t)
- return true;
- if (t == null || getClass() != t.getClass())
- return false;
- Term term = (Term) t;
- if (this.pointer == term.pointer)
- {
- return true;
- }
- return equals(pointer, term.getPointer());
- }
-
- private native boolean equals(long pointer1, long pointer2);
-
- /**
- * Comparison for ordering on terms.
- *
- * @param t the term to compare to
- * @return a negative integer, zero, or a positive integer as this term
- * is less than, equal to, or greater than the specified term.
- */
- @Override
- public int compareTo(Term t)
- {
- return this.compareTo(pointer, t.getPointer());
- }
-
- private native int compareTo(long pointer1, long pointer2);
-
- /**
- * @return the number of children of this term
- */
- public int getNumChildren()
- {
- return getNumChildren(pointer);
- }
-
- private native int getNumChildren(long pointer);
-
- /**
- * Get the child term at a given index.
- *
- * @param index the index of the child term to return
- * @return the child term with the given index
- */
- public Term getChild(int index) throws CVC5ApiException
- {
- Utils.validateUnsigned(index, "index");
- long termPointer = getChild(pointer, index);
- return new Term(solver, termPointer);
- }
-
- private native long getChild(long pointer, int index);
-
- /**
- * @return the id of this term
- */
- public long getId()
- {
- return getId(pointer);
- }
-
- private native long getId(long pointer);
-
- /**
- * @return the kind of this term
- */
- public Kind getKind() throws CVC5ApiException
- {
- int value = getKind(pointer);
- return Kind.fromInt(value);
- }
-
- private native int getKind(long pointer);
-
- /**
- * @return the sort of this term
- */
- public Sort getSort()
- {
- long sortPointer = getSort(pointer);
- return new Sort(solver, sortPointer);
- }
-
- private native long getSort(long pointer);
-
- /**
- * @return the result of replacing 'term' by 'replacement' in this term
- *
- * Note that this replacement is applied during a pre-order traversal and
- * only once to the term. It is not run until fix point.
- */
- public Term substitute(Term term, Term replacement)
- {
- long termPointer = substitute(pointer, term.getPointer(), replacement.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long substitute(long pointer, long termPointer, long replacementPointer);
-
- /**
- * @return the result of simultaneously replacing 'terms' by 'replacements'
- * in this term
- *
- * Note that this replacement is applied during a pre-order traversal and
- * only once to the term. It is not run until fix point. In the case that
- * terms contains duplicates, the replacement earliest in the vector takes
- * priority. For example, calling substitute on f(x,y) with
- * terms = { x, z }, replacements = { g(z), w }
- * results in the term f(g(z),y).
- */
- public Term substitute(List<Term> terms, List<Term> replacements)
- {
- return substitute(terms.toArray(new Term[0]), replacements.toArray(new Term[0]));
- }
-
- /**
- * @return the result of simultaneously replacing 'terms' by 'replacements'
- * in this term
- */
- public Term substitute(Term[] terms, Term[] replacements)
- {
- long[] termPointers = new long[terms.length];
- for (int i = 0; i < termPointers.length; i++)
- {
- termPointers[i] = terms[i].getPointer();
- }
- long[] replacementPointers = new long[replacements.length];
- for (int i = 0; i < replacements.length; i++)
- {
- replacementPointers[i] = replacements[i].getPointer();
- }
-
- long termPointer = substitute(pointer, termPointers, replacementPointers);
- return new Term(solver, termPointer);
- }
-
- private native long substitute(long pointer, long[] termPointers, long[] replacementPointers);
-
- /**
- * @return true iff this term has an operator
- */
- public boolean hasOp()
- {
- return hasOp(pointer);
- }
-
- private native boolean hasOp(long pointer);
-
- /**
- * @return the Op used to create this term
- * @apiNote This is safe to call when hasOp() returns true.
- */
- public Op getOp()
- {
- long opPointer = getOp(pointer);
- return new Op(solver, opPointer);
- }
-
- private native long getOp(long pointer);
-
- /**
- * @return true if the term has a symbol.
- */
- public boolean hasSymbol()
- {
- return hasSymbol(pointer);
- }
-
- private native boolean hasSymbol(long pointer);
-
- /**
- * Asserts hasSymbol().
- * @return the raw symbol of the term.
- */
- public String getSymbol()
- {
- return getSymbol(pointer);
- }
-
- private native String getSymbol(long pointer);
-
- /**
- * @return true if this Term is a null term
- */
- public boolean isNull()
- {
- return isNull(pointer);
- }
-
- private native boolean isNull(long pointer);
-
- /**
- * Boolean negation.
- *
- * @return the Boolean negation of this term
- */
- public Term notTerm()
- {
- long termPointer = notTerm(pointer);
- return new Term(solver, termPointer);
- }
-
- private native long notTerm(long pointer);
-
- /**
- * Boolean and.
- *
- * @param t a Boolean term
- * @return the conjunction of this term and the given term
- */
- public Term andTerm(Term t)
- {
- long termPointer = andTerm(pointer, t.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long andTerm(long pointer, long termPointer);
-
- /**
- * Boolean or.
- *
- * @param t a Boolean term
- * @return the disjunction of this term and the given term
- */
- public Term orTerm(Term t)
- {
- long termPointer = orTerm(pointer, t.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long orTerm(long pointer, long termPointer);
-
- /**
- * Boolean exclusive or.
- *
- * @param t a Boolean term
- * @return the exclusive disjunction of this term and the given term
- */
- public Term xorTerm(Term t)
- {
- long termPointer = xorTerm(pointer, t.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long xorTerm(long pointer, long termPointer);
-
- /**
- * Equality.
- *
- * @param t a Boolean term
- * @return the Boolean equivalence of this term and the given term
- */
- public Term eqTerm(Term t)
- {
- long termPointer = eqTerm(pointer, t.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long eqTerm(long pointer, long termPointer);
-
- /**
- * Boolean implication.
- *
- * @param t a Boolean term
- * @return the implication of this term and the given term
- */
- public Term impTerm(Term t)
- {
- long termPointer = impTerm(pointer, t.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long impTerm(long pointer, long termPointer);
-
- /**
- * If-then-else with this term as the Boolean condition.
- *
- * @param thenTerm the 'then' term
- * @param elseTerm the 'else' term
- * @return the if-then-else term with this term as the Boolean condition
- */
- public Term iteTerm(Term thenTerm, Term elseTerm)
- {
- long termPointer = iteTerm(pointer, thenTerm.getPointer(), elseTerm.getPointer());
- return new Term(solver, termPointer);
- }
-
- private native long iteTerm(long pointer, long thenPointer, long elsePointer);
-
- /**
- * @return a string representation of this term.
- */
- protected native String toString(long pointer);
-
- /**
- * Get integer or real value sign. Must be called on integer or real values,
- * or otherwise an exception is thrown.
- * @return 0 if this term is zero, -1 if this term is a negative real or
- * integer value, 1 if this term is a positive real or integer value.
- */
- public int getRealOrIntegerValueSign()
- {
- return getRealOrIntegerValueSign(pointer);
- }
-
- private native int getRealOrIntegerValueSign(long pointer);
-
- /**
- * @return true if the term is an integer value.
- */
- public boolean isIntegerValue()
- {
- return isIntegerValue(pointer);
- }
-
- private native boolean isIntegerValue(long pointer);
-
- /**
- * Asserts isIntegerValue().
- * @return the integer represented by this term.
- */
- public BigInteger getIntegerValue()
- {
- return new BigInteger(getIntegerValue(pointer));
- }
-
- private native String getIntegerValue(long pointer);
-
- /**
- * @return true if the term is a string constant.
- */
- public boolean isStringValue()
- {
- return isStringValue(pointer);
- }
-
- private native boolean isStringValue(long pointer);
-
- /**
- * @return the stored string constant.
- *
- * Asserts isString().
- *
- * @apiNote This method is not to be confused with toString() which returns
- * the term in some string representation, whatever data it may hold.
- */
- public String getStringValue()
- {
- return getStringValue(pointer);
- }
-
- private native String getStringValue(long pointer);
-
- /**
- * @return true if the term is a rational value.
- */
- public boolean isRealValue()
- {
- return isRealValue(pointer);
- }
-
- private native boolean isRealValue(long pointer);
-
- /**
- * Asserts isRealValue().
- * @return the representation of a rational value as a pair of its numerator
- * and denominator.
- */
- public Pair<BigInteger, BigInteger> getRealValue()
- {
- String rational = getRealValue(pointer);
- return Utils.getRational(rational);
- }
-
- private native String getRealValue(long pointer);
-
- /**
- * @return true if the term is a constant array.
- */
- public boolean isConstArray()
- {
- return isConstArray(pointer);
- }
-
- private native boolean isConstArray(long pointer);
-
- /**
- * Asserts isConstArray().
- * @return the base (element stored at all indices) of a constant array
- */
- public Term getConstArrayBase()
- {
- long termPointer = getConstArrayBase(pointer);
- return new Term(solver, termPointer);
- }
-
- private native long getConstArrayBase(long pointer);
-
- /**
- * @return true if the term is a Boolean value.
- */
- public boolean isBooleanValue()
- {
- return isBooleanValue(pointer);
- }
-
- private native boolean isBooleanValue(long pointer);
- /**
- * Asserts isBooleanValue().
- * @return the representation of a Boolean value as a native Boolean value.
- */
- public boolean getBooleanValue()
- {
- return getBooleanValue(pointer);
- }
-
- private native boolean getBooleanValue(long pointer);
-
- /**
- * @return true if the term is a bit-vector value.
- */
- public boolean isBitVectorValue()
- {
- return isBitVectorValue(pointer);
- }
-
- private native boolean isBitVectorValue(long pointer);
-
- /**
- * Asserts isBitVectorValue().
- * @return the representation of a bit-vector value in bit string representation.
- */
- public String getBitVectorValue() throws CVC5ApiException
- {
- return getBitVectorValue(2);
- }
-
- /**
- * Asserts isBitVectorValue().
- * @return the representation of a bit-vector value in string representation.
- * Supported bases are 2 (bit string), 10 (decimal string) or 16 (hexadecimal
- * string).
- */
- public String getBitVectorValue(int base) throws CVC5ApiException
- {
- Utils.validateUnsigned(base, "base");
- return getBitVectorValue(pointer, base);
- }
-
- private native String getBitVectorValue(long pointer, int base);
-
- /**
- * @return true if the term is an uninterpreted sort value.
- */
- public boolean isUninterpretedSortValue()
- {
- return isUninterpretedSortValue(pointer);
- }
-
- private native boolean isUninterpretedSortValue(long pointer);
-
- /**
- * Asserts isUninterpretedSortValue().
- * @return the representation of an uninterpreted sort value as a string.
- */
- public String getUninterpretedSortValue()
- {
- return getUninterpretedSortValue(pointer);
- }
-
- private native String getUninterpretedSortValue(long pointer);
-
- /**
- * @return true if the term is a floating-point rounding mode value.
- */
- public boolean isRoundingModeValue()
- {
- return isRoundingModeValue(pointer);
- }
-
- private native boolean isRoundingModeValue(long pointer);
-
- /**
- * Asserts isRoundingModeValue().
- * @return the floating-point rounding mode value held by the term.
- */
- public RoundingMode getRoundingModeValue() throws CVC5ApiException
- {
- int value = getRoundingModeValue(pointer);
- return RoundingMode.fromInt(value);
- }
-
- private native int getRoundingModeValue(long pointer);
-
- /**
- * @return true if the term is a tuple value.
- */
- public boolean isTupleValue()
- {
- return isTupleValue(pointer);
- }
-
- private native boolean isTupleValue(long pointer);
-
- /**
- * Asserts isTupleValue().
- * @return the representation of a tuple value as a vector of terms.
- */
- public Term[] getTupleValue()
- {
- long[] termPointers = getTupleValue(pointer);
- return Utils.getTerms(solver, termPointers);
- }
-
- private native long[] getTupleValue(long pointer);
-
- /**
- * @return true if the term is the floating-point value for positive zero.
- */
- public boolean isFloatingPointPosZero()
- {
- return isFloatingPointPosZero(pointer);
- }
-
- private native boolean isFloatingPointPosZero(long pointer);
- /**
- * @return true if the term is the floating-point value for negative zero.
- */
- public boolean isFloatingPointNegZero()
- {
- return isFloatingPointNegZero(pointer);
- }
-
- private native boolean isFloatingPointNegZero(long pointer);
- /**
- * @return true if the term is the floating-point value for positive
- * infinity.
- */
- public boolean isFloatingPointPosInf()
- {
- return isFloatingPointPosInf(pointer);
- }
-
- private native boolean isFloatingPointPosInf(long pointer);
- /**
- * @return true if the term is the floating-point value for negative
- * infinity.
- */
- public boolean isFloatingPointNegInf()
- {
- return isFloatingPointNegInf(pointer);
- }
-
- private native boolean isFloatingPointNegInf(long pointer);
- /**
- * @return true if the term is the floating-point value for not a number.
- */
- public boolean isFloatingPointNaN()
- {
- return isFloatingPointNaN(pointer);
- }
-
- private native boolean isFloatingPointNaN(long pointer);
- /**
- * @return true if the term is a floating-point value.
- */
- public boolean isFloatingPointValue()
- {
- return isFloatingPointValue(pointer);
- }
-
- private native boolean isFloatingPointValue(long pointer);
- /**
- * Asserts isFloatingPointValue().
- * @return the representation of a floating-point value as a tuple of the
- * exponent width, the significand width and a bit-vector value.
- */
- public Triplet<Long, Long, Term> getFloatingPointValue()
- {
- Triplet<Long, Long, Long> triplet = getFloatingPointValue(pointer);
- return new Triplet<>(triplet.first, triplet.second, new Term(solver, triplet.third));
- }
-
- private native Triplet<Long, Long, Long> getFloatingPointValue(long pointer);
-
- /**
- * @return true if the term is a set value.
- */
- public boolean isSetValue()
- {
- return isSetValue(pointer);
- }
-
- private native boolean isSetValue(long pointer);
- /**
- * Asserts isSetValue().
- * @return the representation of a set value as a set of terms.
- */
- public Set<Term> getSetValue()
- {
- long[] termPointers = getSetValue(pointer);
- Term[] terms = Utils.getTerms(solver, termPointers);
- return new HashSet<Term>(Arrays.asList(terms));
- }
-
- private native long[] getSetValue(long pointer);
-
- /**
- * @return true if the term is a sequence value.
- */
- public boolean isSequenceValue()
- {
- return isSequenceValue(pointer);
- }
-
- private native boolean isSequenceValue(long pointer);
-
- /**
- * Asserts isSequenceValue().
- * @apiNote It is usually necessary for sequences to call
- * `Solver::simplify()` to turn a sequence that is constructed by,
- * e.g., concatenation of unit sequences, into a sequence value.
- * @return the representation of a sequence value as a vector of terms.
- */
- public Term[] getSequenceValue()
- {
- long[] termPointers = getSequenceValue(pointer);
- return Utils.getTerms(solver, termPointers);
- }
-
- private native long[] getSequenceValue(long pointer);
-
- /**
- * @return true if the term is a cardinality constraint
- */
- public boolean isCardinalityConstraint()
- {
- return isCardinalityConstraint(pointer);
- }
-
- private native boolean isCardinalityConstraint(long pointer);
-
- /**
- * Asserts isCardinalityConstraint().
- * @return the sort the cardinality constraint is for and its upper bound.
- */
- public Pair<Sort, BigInteger> getCardinalityConstraint()
- {
- Pair<Long, BigInteger> pair = getCardinalityConstraint(pointer);
- Sort sort = new Sort(solver, pair.first);
- return new Pair<Sort, BigInteger>(sort, pair.second);
- }
-
- private native Pair<Long, BigInteger> getCardinalityConstraint(long pointer);
-
- public class ConstIterator implements Iterator<Term>
- {
- private int currentIndex;
- private int size;
-
- public ConstIterator()
- {
- currentIndex = -1;
- size = getNumChildren();
- }
-
- @Override
- public boolean hasNext()
- {
- return currentIndex < size - 1;
- }
-
- @Override
- public Term next()
- {
- if (currentIndex >= size - 1)
- {
- throw new NoSuchElementException();
- }
- currentIndex++;
- try
- {
- return getChild(currentIndex);
- }
- catch (CVC5ApiException e)
- {
- e.printStackTrace();
- throw new RuntimeException(e.getMessage());
- }
- }
- }
-
- @Override
- public Iterator<Term> iterator()
- {
- return new ConstIterator();
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-public class Triplet<A, B, C>
-{
- public A first;
- public B second;
- public C third;
- public Triplet(A first, B second, C third)
- {
- this.first = first;
- this.second = second;
- this.third = third;
- }
-
- @Override
- public boolean equals(Object object)
- {
- if (this == object)
- return true;
- if (object == null || getClass() != object.getClass())
- return false;
-
- return this.first.equals(((Triplet<?, ?, ?>) object).first)
- && this.second.equals(((Triplet<?, ?, ?>) object).second)
- && this.third.equals(((Triplet<?, ?, ?>) object).third);
- }
-}
+++ /dev/null
-/******************************************************************************
- * Top contributors (to current version):
- * Mudathir Mohamed
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved. See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * The cvc5 java API.
- */
-
-package io.github.cvc5.api;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Utils
-{
- static
- {
- loadLibraries();
- }
-
- /**
- * load cvc5 jni library
- */
- public static void loadLibraries()
- {
- System.loadLibrary("cvc5jni");
- }
-
- /**
- * return sorts array from array of pointers
- */
- public static Sort[] getSorts(Solver solver, long[] pointers)
- {
- Sort[] sorts = new Sort[pointers.length];
- for (int i = 0; i < pointers.length; i++)
- {
- sorts[i] = new Sort(solver, pointers[i]);
- }
- return sorts;
- }
-
- /**
- * return terms array from array of pointers
- */
- public static Term[] getTerms(Solver solver, long[] pointers)
- {
- Term[] terms = new Term[pointers.length];
- for (int i = 0; i < pointers.length; i++)
- {
- terms[i] = new Term(solver, pointers[i]);
- }
- return terms;
- }
-
- /**
- * get pointers from one dimensional array
- */
- public static long[] getPointers(IPointer[] objects)
- {
- long[] pointers = new long[objects.length];
- for (int i = 0; i < pointers.length; i++)
- {
- pointers[i] = objects[i].getPointer();
- }
- return pointers;
- }
-
- /**
- * get pointers from two dimensional matrix
- */
- public static long[][] getPointers(IPointer[][] objects)
- {
- long[][] pointers = new long[objects.length][];
- for (int i = 0; i < pointers.length; i++)
- {
- pointers[i] = new long[objects[i].length];
- for (int j = 0; j < objects[i].length; j++)
- {
- pointers[i][j] = objects[i][j].getPointer();
- }
- }
- return pointers;
- }
-
- public static void validateUnsigned(int integer, String name) throws CVC5ApiException
- {
- if (integer < 0)
- {
- throw new CVC5ApiException("Expected " + name + " '" + integer + "' to be non negative.");
- }
- }
-
- public static void validateUnsigned(long integer, String name) throws CVC5ApiException
- {
- if (integer < 0)
- {
- throw new CVC5ApiException("Expected " + name + " '" + integer + "' to be non negative.");
- }
- }
-
- public static void validateUnsigned(int[] integers, String name) throws CVC5ApiException
- {
- for (int i = 0; i < integers.length; i++)
- {
- if (integers[i] < 0)
- {
- throw new CVC5ApiException(
- "Expected " + name + "[" + i + "] '" + integers[i] + "' to be non negative.");
- }
- }
- }
-
- public static void validateUnsigned(long[] integers, String name) throws CVC5ApiException
- {
- for (int i = 0; i < integers.length; i++)
- {
- if (integers[i] < 0)
- {
- throw new CVC5ApiException(
- "Expected " + name + "[" + i + "] '" + integers[i] + "' to be non negative.");
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public static <K> Pair<K, Long>[] getPairs(Pair<K, ? extends AbstractPointer>[] abstractPointers)
- {
- Pair<K, Long>[] pointers = new Pair[abstractPointers.length];
- for (int i = 0; i < pointers.length; i++)
- {
- pointers[i] = new Pair<>(abstractPointers[i].first, abstractPointers[i].second.getPointer());
- }
- return pointers;
- }
-
- /**
- Convert a rational string a/b to a pair of BigIntegers
- */
- public static Pair<BigInteger, BigInteger> getRational(String rational)
- {
- if (rational.contains("/"))
- {
- String[] pair = rational.split("/");
- return new Pair<>(new BigInteger(pair[0]), new BigInteger(pair[1]));
- }
- return new Pair<>(new BigInteger(rational), new BigInteger("1"));
- }
-
- /**
- Convert a pair of BigIntegers to a rational string a/b
- */
- public static String getRational(Pair<BigInteger, BigInteger> pair)
- {
- return pair.first.toString() + "/" + pair.second.toString();
- }
-}
catch (const CVC5ApiOptionException& e) \
{ \
jclass exceptionClass = \
- env->FindClass("io/github/cvc5/api/CVC5ApiOptionException"); \
+ env->FindClass("io/github/cvc5/CVC5ApiOptionException"); \
env->ThrowNew(exceptionClass, e.what()); \
} \
catch (const CVC5ApiRecoverableException& e) \
{ \
jclass exceptionClass = \
- env->FindClass("io/github/cvc5/api/CVC5ApiRecoverableException"); \
+ env->FindClass("io/github/cvc5/CVC5ApiRecoverableException"); \
env->ThrowNew(exceptionClass, e.what()); \
} \
catch (const CVC5ApiException& e) \
{ \
jclass exceptionClass = \
- env->FindClass("io/github/cvc5/api/CVC5ApiException"); \
+ env->FindClass("io/github/cvc5/CVC5ApiException"); \
env->ThrowNew(exceptionClass, e.what()); \
}
#define CVC5_JAVA_API_TRY_CATCH_END_RETURN(env, returnValue) \
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Datatype.h"
+#include "io_github_cvc5_Datatype.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Datatype_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Datatype_deletePointer(
JNIEnv* env, jobject, jlong pointer)
{
delete ((Datatype*)pointer);
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getConstructor
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Datatype_getConstructor__JI(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Datatype_getConstructor__JI(
JNIEnv* env, jobject, jlong pointer, jint idx)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getConstructor
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Datatype_getConstructor__JLjava_lang_String_2(
+Java_io_github_cvc5_Datatype_getConstructor__JLjava_lang_String_2(
JNIEnv* env, jobject, jlong pointer, jstring jName)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getConstructorTerm
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Datatype_getConstructorTerm(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Datatype_getConstructorTerm(
JNIEnv* env, jobject, jlong pointer, jstring jName)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getName
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Datatype_getName(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_getName(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getNumConstructors
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Datatype_getNumConstructors(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Datatype_getNumConstructors(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: getParameters
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Datatype_getParameters(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Datatype_getParameters(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isParametric
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Datatype_isParametric(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Datatype_isParametric(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isCodatatype
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Datatype_isCodatatype(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Datatype_isCodatatype(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isTuple
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Datatype_isTuple(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_isTuple(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isRecord
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Datatype_isRecord(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_isRecord(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isFinite
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Datatype_isFinite(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_isFinite(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isWellFounded
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Datatype_isWellFounded(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Datatype_isWellFounded(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: isNull
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Datatype_isNull(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_isNull(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
}
/*
- * Class: io_github_cvc5_api_Datatype
+ * Class: io_github_cvc5_Datatype
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Datatype_toString(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Datatype_toString(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Datatype* current = (Datatype*)pointer;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_DatatypeConstructor.h"
+#include "io_github_cvc5_DatatypeConstructor.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: deletePointer
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_deletePointer(JNIEnv*,
+Java_io_github_cvc5_DatatypeConstructor_deletePointer(JNIEnv*,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getName
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeConstructor_getName(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeConstructor_getName(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getConstructorTerm
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getConstructorTerm(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructor_getConstructorTerm(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getInstantiatedConstructorTerm
* Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getInstantiatedConstructorTerm(
+Java_io_github_cvc5_DatatypeConstructor_getInstantiatedConstructorTerm(
JNIEnv* env, jobject, jlong pointer, jlong retSortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getTesterTerm
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getTesterTerm(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructor_getTesterTerm(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getNumSelectors
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getNumSelectors(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructor_getNumSelectors(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getSelector
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getSelector__JI(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructor_getSelector__JI(JNIEnv* env,
jobject,
jlong pointer,
jint index)
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getSelector
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getSelector__JLjava_lang_String_2(
+Java_io_github_cvc5_DatatypeConstructor_getSelector__JLjava_lang_String_2(
JNIEnv* env, jobject, jlong pointer, jstring jName)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: getSelectorTerm
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeConstructor_getSelectorTerm(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructor_getSelectorTerm(JNIEnv* env,
jobject,
jlong pointer,
jstring jName)
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_DatatypeConstructor_isNull(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_DatatypeConstructor_isNull(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructor
+ * Class: io_github_cvc5_DatatypeConstructor
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeConstructor_toString(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeConstructor_toString(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_DatatypeConstructorDecl.h"
+#include "io_github_cvc5_DatatypeConstructorDecl.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_DatatypeConstructorDecl
+ * Class: io_github_cvc5_DatatypeConstructorDecl
* Method: deletePointer
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_DatatypeConstructorDecl_deletePointer(JNIEnv*,
+Java_io_github_cvc5_DatatypeConstructorDecl_deletePointer(JNIEnv*,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructorDecl
+ * Class: io_github_cvc5_DatatypeConstructorDecl
* Method: addSelector
* Signature: (JLjava/lang/String;J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_DatatypeConstructorDecl_addSelector(
+Java_io_github_cvc5_DatatypeConstructorDecl_addSelector(
JNIEnv* env, jobject, jlong pointer, jstring jName, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructorDecl
+ * Class: io_github_cvc5_DatatypeConstructorDecl
* Method: addSelectorSelf
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_DatatypeConstructorDecl_addSelectorSelf(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructorDecl_addSelectorSelf(JNIEnv* env,
jobject,
jlong pointer,
jstring jName)
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructorDecl
+ * Class: io_github_cvc5_DatatypeConstructorDecl
* Method: isNull
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_DatatypeConstructorDecl_isNull(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructorDecl_isNull(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeConstructorDecl
+ * Class: io_github_cvc5_DatatypeConstructorDecl
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_DatatypeConstructorDecl_toString(JNIEnv* env,
+Java_io_github_cvc5_DatatypeConstructorDecl_toString(JNIEnv* env,
jobject,
jlong pointer)
{
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_DatatypeDecl.h"
+#include "io_github_cvc5_DatatypeDecl.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_DatatypeDecl_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_DatatypeDecl_deletePointer(
JNIEnv*, jobject, jlong pointer)
{
delete ((DatatypeDecl*)pointer);
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: addConstructor
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_DatatypeDecl_addConstructor(
+JNIEXPORT void JNICALL Java_io_github_cvc5_DatatypeDecl_addConstructor(
JNIEnv* env, jobject, jlong pointer, jlong declPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: getNumConstructors
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_DatatypeDecl_getNumConstructors(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_DatatypeDecl_getNumConstructors(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: isParametric
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_DatatypeDecl_isParametric(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_DatatypeDecl_isParametric(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: isNull
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_DatatypeDecl_isNull(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_DatatypeDecl_isNull(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
DatatypeDecl* current = (DatatypeDecl*)pointer;
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeDecl_toString(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeDecl_toString(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeDecl
+ * Class: io_github_cvc5_DatatypeDecl
* Method: getName
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeDecl_getName(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeDecl_getName(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_DatatypeSelector.h"
+#include "io_github_cvc5_DatatypeSelector.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_DatatypeSelector_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_DatatypeSelector_deletePointer(
JNIEnv*, jobject, jlong pointer)
{
delete ((DatatypeSelector*)pointer);
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: getName
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeSelector_getName(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeSelector_getName(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: getSelectorTerm
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeSelector_getSelectorTerm(JNIEnv* env,
+Java_io_github_cvc5_DatatypeSelector_getSelectorTerm(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: getUpdaterTerm
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_DatatypeSelector_getUpdaterTerm(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_DatatypeSelector_getUpdaterTerm(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: getCodomainSort
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_DatatypeSelector_getCodomainSort(JNIEnv* env,
+Java_io_github_cvc5_DatatypeSelector_getCodomainSort(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_DatatypeSelector_isNull(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_DatatypeSelector_isNull(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_DatatypeSelector
+ * Class: io_github_cvc5_DatatypeSelector
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_DatatypeSelector_toString(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_DatatypeSelector_toString(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Grammar.h"
+#include "io_github_cvc5_Grammar.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: copyGrammar
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Grammar_copyGrammar(JNIEnv* env, jclass, jlong pointer)
+Java_io_github_cvc5_Grammar_copyGrammar(JNIEnv* env, jclass, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Grammar* current = reinterpret_cast<Grammar*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: deletePointer
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Grammar_deletePointer(JNIEnv*, jobject, jlong pointer)
+Java_io_github_cvc5_Grammar_deletePointer(JNIEnv*, jobject, jlong pointer)
{
delete reinterpret_cast<Grammar*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: addRule
* Signature: (JJJ)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Grammar_addRule(JNIEnv* env,
+Java_io_github_cvc5_Grammar_addRule(JNIEnv* env,
jobject,
jlong pointer,
jlong ntSymbolPointer,
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: addRules
* Signature: (JJ[J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Grammar_addRules(JNIEnv* env,
+Java_io_github_cvc5_Grammar_addRules(JNIEnv* env,
jobject,
jlong pointer,
jlong ntSymbolPointer,
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: addAnyConstant
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Grammar_addAnyConstant(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Grammar_addAnyConstant(
JNIEnv* env, jobject, jlong pointer, jlong ntSymbolPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: addAnyVariable
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Grammar_addAnyVariable(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Grammar_addAnyVariable(
JNIEnv* env, jobject, jlong pointer, jlong ntSymbolPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Grammar
+ * Class: io_github_cvc5_Grammar
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Grammar_toString(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Grammar_toString(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Grammar* current = reinterpret_cast<Grammar*>(pointer);
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Op.h"
+#include "io_github_cvc5_Op.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Op_deletePointer(JNIEnv*,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Op_deletePointer(JNIEnv*,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: equals
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Op_equals(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Op_equals(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: getKind
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Op_getKind(JNIEnv* env,
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Op_getKind(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Op_isNull(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Op_isNull(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: isIndexed
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Op_isIndexed(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Op_isIndexed(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: getNumIndices
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Op_getNumIndices(JNIEnv* env,
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Op_getNumIndices(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: get
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Op_get(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Op_get(JNIEnv* env,
jobject,
jlong pointer,
jint i)
}
/*
- * Class: io_github_cvc5_api_Op
+ * Class: io_github_cvc5_Op
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Op_toString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Op_toString(JNIEnv* env,
jobject,
jlong pointer)
{
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_OptionInfo.h"
+#include "io_github_cvc5_OptionInfo.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_OptionInfo_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_OptionInfo_deletePointer(
JNIEnv*, jobject, jlong pointer)
{
delete reinterpret_cast<OptionInfo*>(pointer);
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_OptionInfo_toString(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_OptionInfo_toString(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
OptionInfo* current = reinterpret_cast<OptionInfo*>(pointer);
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: getName
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_OptionInfo_getName(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_OptionInfo_getName(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
OptionInfo* current = reinterpret_cast<OptionInfo*>(pointer);
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: getAliases
* Signature: (J)[Ljava/lang/String;
*/
-JNIEXPORT jobjectArray JNICALL Java_io_github_cvc5_api_OptionInfo_getAliases(
+JNIEXPORT jobjectArray JNICALL Java_io_github_cvc5_OptionInfo_getAliases(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: getSetByUser
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_OptionInfo_getSetByUser(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_OptionInfo_getSetByUser(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
const OptionInfo::NumberInfo<uint64_t>& info);
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: getBaseInfo
- * Signature: (J)Lio/github/cvc5/api/OptionInfo/BaseInfo;
+ * Signature: (J)Lio/github/cvc5/OptionInfo/BaseInfo;
*/
-JNIEXPORT jobject JNICALL Java_io_github_cvc5_api_OptionInfo_getBaseInfo(
+JNIEXPORT jobject JNICALL Java_io_github_cvc5_OptionInfo_getBaseInfo(
JNIEnv* env, jobject optionInfo, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
if (std::holds_alternative<OptionInfo::VoidInfo>(v))
{
jclass voidInfoClass =
- env->FindClass("io/github/cvc5/api/OptionInfo$VoidInfo");
+ env->FindClass("io/github/cvc5/OptionInfo$VoidInfo");
jmethodID methodId = env->GetMethodID(
- voidInfoClass, "<init>", "(Lio/github/cvc5/api/OptionInfo;)V");
+ voidInfoClass, "<init>", "(Lio/github/cvc5/OptionInfo;)V");
jobject ret = env->NewObject(voidInfoClass, methodId, optionInfo);
return ret;
}
|| std::holds_alternative<OptionInfo::ValueInfo<std::string>>(v))
{
jclass valueInfoClass =
- env->FindClass("io/github/cvc5/api/OptionInfo$ValueInfo");
+ env->FindClass("io/github/cvc5/OptionInfo$ValueInfo");
jmethodID methodId =
env->GetMethodID(valueInfoClass,
"<init>",
- "(Lio/github/cvc5/api/OptionInfo;Ljava/lang/"
+ "(Lio/github/cvc5/OptionInfo;Ljava/lang/"
"Object;Ljava/lang/Object;)V");
if (std::holds_alternative<OptionInfo::ValueInfo<bool>>(v))
|| std::holds_alternative<OptionInfo::NumberInfo<double>>(v))
{
jclass numberInfoClass =
- env->FindClass("io/github/cvc5/api/OptionInfo$NumberInfo");
+ env->FindClass("io/github/cvc5/OptionInfo$NumberInfo");
jmethodID methodId = env->GetMethodID(
numberInfoClass,
"<init>",
- "(Lio/github/cvc5/api/OptionInfo;Ljava/lang/Object;Ljava/lang/"
+ "(Lio/github/cvc5/OptionInfo;Ljava/lang/Object;Ljava/lang/"
"Object;Ljava/lang/Object;Ljava/lang/Object;)V");
if (std::holds_alternative<OptionInfo::NumberInfo<int64_t>>(v))
if (std::holds_alternative<OptionInfo::ModeInfo>(v))
{
jclass modeInfoClass =
- env->FindClass("io/github/cvc5/api/OptionInfo$ModeInfo");
+ env->FindClass("io/github/cvc5/OptionInfo$ModeInfo");
jmethodID methodId = env->GetMethodID(
modeInfoClass,
"<init>",
- "(Lio/github/cvc5/api/OptionInfo;Ljava/lang/String;Ljava/lang/"
+ "(Lio/github/cvc5/OptionInfo;Ljava/lang/String;Ljava/lang/"
"String;[Ljava/lang/String;)V");
auto info = std::get<OptionInfo::ModeInfo>(v);
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: booleanValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_OptionInfo_booleanValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_OptionInfo_booleanValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: stringValue
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_OptionInfo_stringValue(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_OptionInfo_stringValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: intValue
* Signature: (J)Ljava/math/BigInteger;
*/
JNIEXPORT jobject JNICALL
-Java_io_github_cvc5_api_OptionInfo_intValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_OptionInfo_intValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
OptionInfo* current = reinterpret_cast<OptionInfo*>(pointer);
}
/*
- * Class: io_github_cvc5_api_OptionInfo
+ * Class: io_github_cvc5_OptionInfo
* Method: doubleValue
* Signature: (J)D
*/
-JNIEXPORT jdouble JNICALL Java_io_github_cvc5_api_OptionInfo_doubleValue(
+JNIEXPORT jdouble JNICALL Java_io_github_cvc5_OptionInfo_doubleValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Result.h"
+#include "io_github_cvc5_Result.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: deletePointer
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Result_deletePointer(JNIEnv*, jobject, jlong pointer)
+Java_io_github_cvc5_Result_deletePointer(JNIEnv*, jobject, jlong pointer)
{
delete ((Result*)pointer);
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Result_isNull(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Result_isNull(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: isSat
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Result_isSat(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Result_isSat(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: isUnsat
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Result_isUnsat(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Result_isUnsat(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: isUnknown
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Result_isUnknown(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Result_isUnknown(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Result* current = (Result*)pointer;
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: equals
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Result_equals(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Result_equals(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: getUnknownExplanation
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Result_getUnknownExplanation(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Result_getUnknownExplanation(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Result
+ * Class: io_github_cvc5_Result
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Result_toString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Result_toString(JNIEnv* env,
jobject,
jlong pointer)
{
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Solver.h"
+#include "io_github_cvc5_Solver.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: newSolver
* Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_newSolver(JNIEnv*,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_newSolver(JNIEnv*,
jobject)
{
Solver* solver = new Solver();
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: deletePointer
* Signature: (J)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Solver_deletePointer(JNIEnv*, jclass, jlong pointer)
+Java_io_github_cvc5_Solver_deletePointer(JNIEnv*, jclass, jlong pointer)
{
delete (reinterpret_cast<Solver*>(pointer));
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullSort
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getNullSort(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Solver_getNullSort(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getBooleanSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getBooleanSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getBooleanSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getIntegerSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getIntegerSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getIntegerSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getRealSort
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getRealSort(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Solver_getRealSort(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getRegExpSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getRegExpSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getRegExpSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getRoundingModeSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getRoundingModeSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getRoundingModeSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getStringSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getStringSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getStringSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkArraySort
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkArraySort(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkArraySort(JNIEnv* env,
jobject,
jlong pointer,
jlong indexSortPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkBitVectorSort
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkBitVectorSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkBitVectorSort(
JNIEnv* env, jobject, jlong pointer, jint size)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointSort
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointSort(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeSort
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkDatatypeSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkDatatypeSort(
JNIEnv* env, jobject, jlong pointer, jlong datatypeDeclPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeSorts
* Signature: (J[J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeSorts__J_3J(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkDatatypeSorts__J_3J(JNIEnv* env,
jobject,
jlong pointer,
jlongArray jDecls)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeSorts
* Signature: (J[J[J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeSorts__J_3J_3J(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkDatatypeSorts__J_3J_3J(JNIEnv* env,
jobject,
jlong pointer,
jlongArray jDecls,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFunctionSort
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkFunctionSort__JJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkFunctionSort__JJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong domainPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFunctionSort
* Signature: (J[JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkFunctionSort__J_3JJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkFunctionSort__J_3JJ(JNIEnv* env,
jobject,
jlong pointer,
jlongArray sortPointers,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkParamSort
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkParamSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkParamSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkPredicateSort
* Signature: (J[J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkPredicateSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkPredicateSort(
JNIEnv* env, jobject, jlong pointer, jlongArray sortPointers)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRecordSort
- * Signature: (J[Lio/github/cvc5/api/Pair;)J
+ * Signature: (J[Lio/github/cvc5/Pair;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkRecordSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkRecordSort(
JNIEnv* env, jobject, jlong pointer, jobjectArray jFields)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
jsize size = env->GetArrayLength(jFields);
- // Lio/github/cvc5/api/Pair; is signature of cvc5.Pair<String, Long>
- jclass pairClass = env->FindClass("Lio/github/cvc5/api/Pair;");
+ // Lio/github/cvc5/Pair; is signature of cvc5.Pair<String, Long>
+ jclass pairClass = env->FindClass("Lio/github/cvc5/Pair;");
jclass longClass = env->FindClass("Ljava/lang/Long;");
// Ljava/lang/Object; is the signature of cvc5.Pair.first field
jfieldID firstFieldId =
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkSetSort
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkSetSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkSetSort(
JNIEnv* env, jobject, jlong pointer, jlong elemSortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkBagSort
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkBagSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkBagSort(
JNIEnv* env, jobject, jlong pointer, jlong elemSortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkSequenceSort
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkSequenceSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkSequenceSort(
JNIEnv* env, jobject, jlong pointer, jlong elemSortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkUninterpretedSort
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkUninterpretedSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkUninterpretedSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkUnresolvedSort
* Signature: (JLjava/lang/String;I)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkUnresolvedSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkUnresolvedSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jint arity)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkUninterpretedSortConstructorSort
* Signature: (JLjava/lang/String;I)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkUninterpretedSortConstructorSort(
+Java_io_github_cvc5_Solver_mkUninterpretedSortConstructorSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jint arity)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTupleSort
* Signature: (J[J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTupleSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTupleSort(
JNIEnv* env, jobject, jlong pointer, jlongArray sortPointers)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTerm__JI(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTerm__JI(
JNIEnv* env, jobject, jlong pointer, jint kindValue)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JIJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTerm__JIJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTerm__JIJ(
JNIEnv* env, jobject, jlong pointer, jint kindValue, jlong childPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JIJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JIJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JIJJ(JNIEnv* env,
jobject,
jlong pointer,
jint kindValue,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JIJJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JIJJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JIJJJ(JNIEnv* env,
jobject,
jlong pointer,
jint kindValue,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JI[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JI_3J(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JI_3J(JNIEnv* env,
jobject,
jlong pointer,
jint kindValue,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTerm__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTerm__JJ(
JNIEnv* env, jobject, jlong pointer, jlong opPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JJJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTerm__JJJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTerm__JJJ(
JNIEnv* env, jobject, jlong pointer, jlong opPointer, jlong childPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JJJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JJJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JJJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong opPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JJJJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JJJJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JJJJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong opPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTerm
* Signature: (JJ[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTerm__JJ_3J(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTerm__JJ_3J(JNIEnv* env,
jobject,
jlong pointer,
jlong opPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTuple
* Signature: (J[J[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkTuple(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkTuple(JNIEnv* env,
jobject,
jlong pointer,
jlongArray sortPointers,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkOp
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkOp__JI(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkOp__JI(JNIEnv* env,
jobject,
jlong pointer,
jint kindValue)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkOp
* Signature: (JILjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkOp__JILjava_lang_String_2(
+Java_io_github_cvc5_Solver_mkOp__JILjava_lang_String_2(
JNIEnv* env, jobject, jlong pointer, jint kindValue, jstring jArg)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkOp
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkOp__JII(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkOp__JII(
JNIEnv* env, jobject, jlong pointer, jint kindValue, jint arg)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkOp
* Signature: (JIII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkOp__JIII(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkOp__JIII(
JNIEnv* env, jobject, jlong pointer, jint kindValue, jint arg1, jint arg2)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkOp
* Signature: (JI[I)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkOp__JI_3I(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkOp__JI_3I(
JNIEnv* env, jobject, jlong pointer, jint kindValue, jintArray jArgs)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkTrue
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkTrue(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkTrue(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFalse
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFalse(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFalse(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkBoolean
* Signature: (JZ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkBoolean(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkBoolean(JNIEnv* env,
jobject,
jlong pointer,
jboolean val)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkPi
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkPi(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkPi(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkInteger
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkInteger__JLjava_lang_String_2(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkInteger__JLjava_lang_String_2(JNIEnv* env,
jobject,
jlong pointer,
jstring jS)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkInteger
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkInteger__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkInteger__JJ(
JNIEnv* env, jobject, jlong pointer, jlong val)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkReal
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkReal__JLjava_lang_String_2(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkReal__JLjava_lang_String_2(JNIEnv* env,
jobject,
jlong pointer,
jstring jS)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRealValue
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkRealValue(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkRealValue(
JNIEnv* env, jobject, jlong pointer, jlong val)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkReal
* Signature: (JJJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkReal__JJJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkReal__JJJ(
JNIEnv* env, jobject, jlong pointer, jlong num, jlong den)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRegexpNone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkRegexpNone(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkRegexpNone(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRegexpAll
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkRegexpAll(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Solver_mkRegexpAll(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRegexpAllchar
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkRegexpAllchar(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkRegexpAllchar(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkEmptySet
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkEmptySet(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkEmptySet(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkEmptyBag
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkEmptyBag(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkEmptyBag(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkSepEmp
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkSepEmp(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkSepEmp(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkSepNil
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkSepNil(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkSepNil(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkString
* Signature: (JLjava/lang/String;Z)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkString__JLjava_lang_String_2Z(
+Java_io_github_cvc5_Solver_mkString__JLjava_lang_String_2Z(
JNIEnv* env, jobject, jlong pointer, jstring jS, jboolean useEscSequences)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkEmptySequence
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkEmptySequence(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkEmptySequence(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkUniverseSet
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkUniverseSet(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkUniverseSet(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkBitVector
* Signature: (JIJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkBitVector__JIJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkBitVector__JIJ(
JNIEnv* env, jobject, jlong pointer, jint size, jlong val)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkBitVector
* Signature: (JILjava/lang/String;I)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkBitVector__JILjava_lang_String_2I(
+Java_io_github_cvc5_Solver_mkBitVector__JILjava_lang_String_2I(
JNIEnv* env, jobject, jlong pointer, jint size, jstring jS, jint base)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkConstArray
* Signature: (JJJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkConstArray(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkConstArray(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer, jlong valPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointPosInf
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointPosInf(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointPosInf(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointNegInf
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointNegInf(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointNegInf(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointNaN
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointNaN(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointNaN(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointPosZero
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointPosZero(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointPosZero(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPointNegZero
* Signature: (JII)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPointNegZero(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPointNegZero(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkRoundingMode
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkRoundingMode(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkRoundingMode(
JNIEnv* env, jobject, jlong pointer, jint rm)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkFloatingPoint
* Signature: (JIIJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkFloatingPoint(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkFloatingPoint(
JNIEnv* env, jobject, jlong pointer, jint exp, jint sig, jlong valPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkCardinalityConstraint
* Signature: (JJI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkCardinalityConstraint(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkCardinalityConstraint(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer, jint upperBound)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkConst
* Signature: (JJLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkConst__JJLjava_lang_String_2(
+Java_io_github_cvc5_Solver_mkConst__JJLjava_lang_String_2(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer, jstring jSymbol)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkConst
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkConst__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkConst__JJ(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkVar
* Signature: (JJLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_mkVar(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_mkVar(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer, jstring jSymbol)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeConstructorDecl
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeConstructorDecl(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkDatatypeConstructorDecl(JNIEnv* env,
jobject,
jlong pointer,
jstring jName)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeDecl
* Signature: (JLjava/lang/String;Z)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeDecl__JLjava_lang_String_2Z(
+Java_io_github_cvc5_Solver_mkDatatypeDecl__JLjava_lang_String_2Z(
JNIEnv* env, jobject, jlong pointer, jstring jName, jboolean isCoDatatype)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeDecl
* Signature: (JLjava/lang/String;JZ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeDecl__JLjava_lang_String_2JZ(
+Java_io_github_cvc5_Solver_mkDatatypeDecl__JLjava_lang_String_2JZ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkDatatypeDecl
* Signature: (JLjava/lang/String;[JZ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkDatatypeDecl__JLjava_lang_String_2_3JZ(
+Java_io_github_cvc5_Solver_mkDatatypeDecl__JLjava_lang_String_2_3JZ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: simplify
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_simplify(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_simplify(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: assertFormula
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_assertFormula(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_assertFormula(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: checkSat
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_checkSat(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_checkSat(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: checkSatAssuming
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_checkSatAssuming__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_checkSatAssuming__JJ(
JNIEnv* env, jobject, jlong pointer, jlong assumptionPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: checkSatAssuming
* Signature: (J[J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_checkSatAssuming__J_3J(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_checkSatAssuming__J_3J(
JNIEnv* env, jobject, jlong pointer, jlongArray jAssumptions)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: declareDatatype
* Signature: (JLjava/lang/String;[J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_declareDatatype(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_declareDatatype(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jlongArray jCtors)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: declareFun
* Signature: (JLjava/lang/String;[JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_declareFun(JNIEnv* env,
+Java_io_github_cvc5_Solver_declareFun(JNIEnv* env,
jobject,
jlong pointer,
jstring jSymbol,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: declareSort
* Signature: (JLjava/lang/String;I)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_declareSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_declareSort(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jint arity)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: defineFun
* Signature: (JLjava/lang/String;[JJJZ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_defineFun(JNIEnv* env,
+Java_io_github_cvc5_Solver_defineFun(JNIEnv* env,
jobject,
jlong pointer,
jstring jSymbol,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: defineFunRec
* Signature: (JLjava/lang/String;[JJJZ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_defineFunRec__JLjava_lang_String_2_3JJJZ(
+Java_io_github_cvc5_Solver_defineFunRec__JLjava_lang_String_2_3JJJZ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: defineFunRec
* Signature: (JJ[JJZ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_defineFunRec__JJ_3JJZ(JNIEnv* env,
+Java_io_github_cvc5_Solver_defineFunRec__JJ_3JJZ(JNIEnv* env,
jobject,
jlong pointer,
jlong funPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: defineFunsRec
* Signature: (J[J[[J[JZ)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Solver_defineFunsRec(JNIEnv* env,
+Java_io_github_cvc5_Solver_defineFunsRec(JNIEnv* env,
jobject,
jlong pointer,
jlongArray jFuns,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getLearnedLiterals
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Solver_getLearnedLiterals(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Solver_getLearnedLiterals(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getAssertions
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Solver_getAssertions(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Solver_getAssertions(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getInfo
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Solver_getInfo(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Solver_getInfo(JNIEnv* env,
jobject,
jlong pointer,
jstring jFlag)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getOption
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Solver_getOption(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Solver_getOption(
JNIEnv* env, jobject, jlong pointer, jstring jOption)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getOptionNames
* Signature: (J)[Ljava/lang/String;
*/
-JNIEXPORT jobjectArray JNICALL Java_io_github_cvc5_api_Solver_getOptionNames(
+JNIEXPORT jobjectArray JNICALL Java_io_github_cvc5_Solver_getOptionNames(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getOptionInfo
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getOptionInfo(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getOptionInfo(
JNIEnv* env, jobject, jlong pointer, jstring jOption)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getDriverOptions
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getDriverOptions(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getDriverOptions(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getUnsatAssumptions
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Solver_getUnsatAssumptions(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Solver_getUnsatAssumptions(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getUnsatCore
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Solver_getUnsatCore(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Solver_getUnsatCore(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Solver* solver = reinterpret_cast<Solver*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getDifficulty
* Signature: (J)Ljava/util/Map;
*/
-JNIEXPORT jobject JNICALL Java_io_github_cvc5_api_Solver_getDifficulty(
+JNIEXPORT jobject JNICALL Java_io_github_cvc5_Solver_getDifficulty(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getProof
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Solver_getProof(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Solver_getProof(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getValue
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getValue__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getValue__JJ(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getValue
* Signature: (J[J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Solver_getValue__J_3J(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Solver_getValue__J_3J(
JNIEnv* env, jobject, jlong pointer, jlongArray termPointers)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getModelDomainElements
* Signature: (JJ)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Solver_getModelDomainElements(JNIEnv* env,
+Java_io_github_cvc5_Solver_getModelDomainElements(JNIEnv* env,
jobject,
jlong pointer,
jlong sortPointer)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: isModelCoreSymbol
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Solver_isModelCoreSymbol(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Solver_isModelCoreSymbol(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getModel
* Signature: (J[J[J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Solver_getModel(JNIEnv* env,
+Java_io_github_cvc5_Solver_getModel(JNIEnv* env,
jobject,
jlong pointer,
jlongArray sortPointers,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getQuantifierElimination
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getQuantifierElimination(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getQuantifierElimination(
JNIEnv* env, jobject, jlong pointer, jlong qPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getQuantifierEliminationDisjunct
* Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getQuantifierEliminationDisjunct(JNIEnv* env,
+Java_io_github_cvc5_Solver_getQuantifierEliminationDisjunct(JNIEnv* env,
jobject,
jlong pointer,
jlong qPointer)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: declareSepHeap
* Signature: (JJJ)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Solver_declareSepHeap(JNIEnv* env,
+Java_io_github_cvc5_Solver_declareSepHeap(JNIEnv* env,
jobject,
jlong pointer,
jlong locSortPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getValueSepHeap
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getValueSepHeap(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getValueSepHeap(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getValueSepNil
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getValueSepNil(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getValueSepNil(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: pop
* Signature: (JI)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_pop(JNIEnv* env,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_pop(JNIEnv* env,
jobject,
jlong pointer,
jint nscopes)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getInterpolant
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getInterpolant__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getInterpolant__JJ(
JNIEnv* env, jobject, jlong pointer, jlong conjPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getInterpolant
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getInterpolant__JJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_getInterpolant__JJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong conjPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getInterpolantNext
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getInterpolantNext(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getInterpolantNext(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getAbduct
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getAbduct__JJ(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getAbduct__JJ(
JNIEnv* env, jobject, jlong pointer, jlong conjPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getAbduct
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getAbduct__JJJ(JNIEnv* env,
+Java_io_github_cvc5_Solver_getAbduct__JJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong conjPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getAbductNext
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getAbductNext(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getAbductNext(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: blockModel
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_blockModel(JNIEnv* env,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_blockModel(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: blockModelValues
* Signature: (J[J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_blockModelValues(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_blockModelValues(
JNIEnv* env, jobject, jlong pointer, jlongArray jTerms)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getInstantiations
* Signature: (J[J[J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Solver_getInstantiations(JNIEnv* env,
+Java_io_github_cvc5_Solver_getInstantiations(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: push
* Signature: (JI)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_push(JNIEnv* env,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_push(JNIEnv* env,
jobject,
jlong pointer,
jint nscopes)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: resetAssertions
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_resetAssertions(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_resetAssertions(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: setInfo
* Signature: (JLjava/lang/String;Ljava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_setInfo(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_setInfo(
JNIEnv* env, jobject, jlong pointer, jstring jKeyword, jstring jValue)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: setLogic
* Signature: (JLjava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_setLogic(JNIEnv* env,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_setLogic(JNIEnv* env,
jobject,
jlong pointer,
jstring jLogic)
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: setOption
* Signature: (JLjava/lang/String;Ljava/lang/String;)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_setOption(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_setOption(
JNIEnv* env, jobject, jlong pointer, jstring jOption, jstring jValue)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: declareSygusVar
* Signature: (JJLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_declareSygusVar(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_declareSygusVar(
JNIEnv* env, jobject, jlong pointer, jlong sortPointer, jstring jSymbol)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: mkSygusGrammar
* Signature: (J[J[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_mkSygusGrammar(JNIEnv* env,
+Java_io_github_cvc5_Solver_mkSygusGrammar(JNIEnv* env,
jobject,
jlong pointer,
jlongArray jBoundVars,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: synthFun
* Signature: (JLjava/lang/String;[JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_synthFun__JLjava_lang_String_2_3JJ(
+Java_io_github_cvc5_Solver_synthFun__JLjava_lang_String_2_3JJ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: synthFun
* Signature: (JLjava/lang/String;[JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_synthFun__JLjava_lang_String_2_3JJJ(
+Java_io_github_cvc5_Solver_synthFun__JLjava_lang_String_2_3JJJ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: synthInv
* Signature: (JLjava/lang/String;[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_synthInv__JLjava_lang_String_2_3J(
+Java_io_github_cvc5_Solver_synthInv__JLjava_lang_String_2_3J(
JNIEnv* env, jobject, jlong pointer, jstring jSymbol, jlongArray jVars)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: synthInv
* Signature: (JLjava/lang/String;[JJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_synthInv__JLjava_lang_String_2_3JJ(
+Java_io_github_cvc5_Solver_synthInv__JLjava_lang_String_2_3JJ(
JNIEnv* env,
jobject,
jlong pointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: addSygusConstraint
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_addSygusConstraint(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_addSygusConstraint(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: addSygusAssume
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Solver_addSygusAssume(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Solver_addSygusAssume(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: addSygusInvConstraint
* Signature: (JJJJJ)V
*/
JNIEXPORT void JNICALL
-Java_io_github_cvc5_api_Solver_addSygusInvConstraint(JNIEnv* env,
+Java_io_github_cvc5_Solver_addSygusInvConstraint(JNIEnv* env,
jobject,
jlong pointer,
jlong invPointer,
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: checkSynth
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_checkSynth(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_checkSynth(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: checkSynthNext
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_checkSynthNext(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_checkSynthNext(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getSynthSolution
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getSynthSolution(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getSynthSolution(
JNIEnv* env, jobject, jlong pointer, jlong termPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getSynthSolutions
* Signature: (J[J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Solver_getSynthSolutions(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Solver_getSynthSolutions(
JNIEnv* env, jobject, jlong pointer, jlongArray jTerms)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getStatistics
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getStatistics(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getStatistics(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullTerm
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getNullTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getNullTerm(JNIEnv* env,
jobject,
jlong)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullResult
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getNullResult(JNIEnv* env, jobject, jlong)
+Java_io_github_cvc5_Solver_getNullResult(JNIEnv* env, jobject, jlong)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Result* ret = new Result();
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullSynthResult
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getNullSynthResult(JNIEnv* env, jobject, jlong)
+Java_io_github_cvc5_Solver_getNullSynthResult(JNIEnv* env, jobject, jlong)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
SynthResult* ret = new SynthResult();
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullOp
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_getNullOp(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Solver_getNullOp(JNIEnv* env,
jobject,
jlong)
{
}
/*
- * Class: io_github_cvc5_api_Solver
+ * Class: io_github_cvc5_Solver
* Method: getNullDatatypeDecl
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Solver_getNullDatatypeDecl(JNIEnv* env, jobject, jlong)
+Java_io_github_cvc5_Solver_getNullDatatypeDecl(JNIEnv* env, jobject, jlong)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
DatatypeDecl* ret = new DatatypeDecl();
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Sort.h"
+#include "io_github_cvc5_Sort.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Sort_deletePointer(JNIEnv*,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Sort_deletePointer(JNIEnv*,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: equals
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_equals(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_equals(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: compareTo
* Signature: (JJ)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_compareTo(JNIEnv* env,
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Sort_compareTo(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: hasSymbol
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_hasSymbol(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_hasSymbol(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getSymbol
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Sort_getSymbol(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Sort_getSymbol(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isNull(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isNull(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isBoolean
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isBoolean(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isBoolean(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isInteger
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isInteger(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isInteger(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isReal
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isReal(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isReal(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isString
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isString(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isRegExp
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isRegExp(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isRegExp(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isRoundingMode
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isRoundingMode(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isRoundingMode(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isBitVector
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isBitVector(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isBitVector(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isFloatingPoint
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isFloatingPoint(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isFloatingPoint(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isDatatype
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isDatatype(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isDatatype(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isConstructor
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isConstructor(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isConstructor(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isSelector
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isSelector(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isSelector(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isTester
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isTester(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isTester(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isUpdater
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isUpdater(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isUpdater(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isFunction
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isFunction(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isFunction(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isPredicate
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isPredicate(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isPredicate(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isTuple
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isTuple(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isTuple(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isRecord
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isRecord(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isRecord(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isArray
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isArray(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isArray(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isSet
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isSet(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isSet(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isBag
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isBag(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isBag(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isSequence
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isSequence(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isSequence(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isUninterpretedSort
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Sort_isUninterpretedSort(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Sort_isUninterpretedSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isUninterpretedSortConstructor
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isUninterpretedSortConstructor(JNIEnv* env,
+Java_io_github_cvc5_Sort_isUninterpretedSortConstructor(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: isInstantiated
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Sort_isInstantiated(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_isInstantiated(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getInstantiatedParameters
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Sort_getInstantiatedParameters(JNIEnv* env,
+Java_io_github_cvc5_Sort_getInstantiatedParameters(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getUninterpretedSortConstructor
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Sort_getUninterpretedSortConstructor(JNIEnv* env,
+Java_io_github_cvc5_Sort_getUninterpretedSortConstructor(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getDatatype
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getDatatype(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getDatatype(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: instantiate
* Signature: (J[J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_instantiate(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_instantiate(
JNIEnv* env, jobject, jlong pointer, jlongArray paramsPointers)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: substitute
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Sort_substitute__JJJ(JNIEnv* env,
+Java_io_github_cvc5_Sort_substitute__JJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong sortPointer,
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: substitute
* Signature: (J[J[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Sort_substitute__J_3J_3J(JNIEnv* env,
+Java_io_github_cvc5_Sort_substitute__J_3J_3J(JNIEnv* env,
jobject,
jlong pointer,
jlongArray sortPointers,
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Sort_toString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Sort_toString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getConstructorArity
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_getConstructorArity(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Sort_getConstructorArity(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getConstructorDomainSorts
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Sort_getConstructorDomainSorts(JNIEnv* env,
+Java_io_github_cvc5_Sort_getConstructorDomainSorts(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getConstructorCodomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getConstructorCodomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getConstructorCodomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getSelectorDomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getSelectorDomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getSelectorDomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getSelectorCodomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getSelectorCodomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getSelectorCodomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getTesterDomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getTesterDomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getTesterDomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getTesterCodomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getTesterCodomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getTesterCodomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getFunctionArity
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_getFunctionArity(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Sort_getFunctionArity(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getFunctionDomainSorts
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Sort_getFunctionDomainSorts(JNIEnv* env,
+Java_io_github_cvc5_Sort_getFunctionDomainSorts(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getFunctionCodomainSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getFunctionCodomainSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getFunctionCodomainSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getArrayIndexSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getArrayIndexSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getArrayIndexSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getArrayElementSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getArrayElementSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getArrayElementSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getSetElementSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getSetElementSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getSetElementSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getBagElementSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getBagElementSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getBagElementSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getSequenceElementSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Sort_getSequenceElementSort(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Sort_getSequenceElementSort(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getUninterpretedSortConstructorArity
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Sort_getUninterpretedSortConstructorArity(JNIEnv* env,
+Java_io_github_cvc5_Sort_getUninterpretedSortConstructorArity(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getBitVectorSize
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_getBitVectorSize(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Sort_getBitVectorSize(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getFloatingPointExponentSize
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Sort_getFloatingPointExponentSize(JNIEnv* env,
+Java_io_github_cvc5_Sort_getFloatingPointExponentSize(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getFloatingPointSignificandSize
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Sort_getFloatingPointSignificandSize(JNIEnv* env,
+Java_io_github_cvc5_Sort_getFloatingPointSignificandSize(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getDatatypeArity
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Sort_getDatatypeArity(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Sort_getDatatypeArity(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getTupleLength
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Sort_getTupleLength(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_getTupleLength(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Sort
+ * Class: io_github_cvc5_Sort
* Method: getTupleSorts
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Sort_getTupleSorts(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Sort_getTupleSorts(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Sort* current = reinterpret_cast<Sort*>(pointer);
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Stat.h"
+#include "io_github_cvc5_Stat.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Stat_deletePointer(JNIEnv*,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Stat_deletePointer(JNIEnv*,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Stat_toString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Stat_toString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isInternal
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Stat_isInternal(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Stat_isInternal(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isDefault
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Stat_isDefault(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Stat_isDefault(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isInt
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Stat_isInt(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Stat_isInt(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: getInt
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Stat_getInt(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Stat_getInt(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isDouble
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Stat_isDouble(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Stat_isDouble(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: getDouble
* Signature: (J)D
*/
-JNIEXPORT jdouble JNICALL Java_io_github_cvc5_api_Stat_getDouble(JNIEnv* env,
+JNIEXPORT jdouble JNICALL Java_io_github_cvc5_Stat_getDouble(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isString
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Stat_isString(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Stat_isString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: getString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Stat_getString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Stat_getString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: isHistogram
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Stat_isHistogram(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Stat_isHistogram(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Stat* current = reinterpret_cast<Stat*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Stat
+ * Class: io_github_cvc5_Stat
* Method: getHistogram
* Signature: (J)Ljava/util/Map;
*/
JNIEXPORT jobject JNICALL
-Java_io_github_cvc5_api_Stat_getHistogram(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Stat_getHistogram(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Stat* current = reinterpret_cast<Stat*>(pointer);
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Statistics.h"
+#include "io_github_cvc5_Statistics.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Statistics_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Statistics_deletePointer(
JNIEnv*, jobject, jlong pointer)
{
delete reinterpret_cast<Statistics*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Statistics_toString(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Statistics_toString(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: get
* Signature: (JLjava/lang/String;)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Statistics_get(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Statistics_get(JNIEnv* env,
jobject,
jlong pointer,
jstring jName)
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: getIterator
* Signature: (JZZ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Statistics_getIteratorOpts(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Statistics_getIteratorOpts(
JNIEnv* env, jobject, jlong pointer, jboolean internal, jboolean defaulted)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: getIterator
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Statistics_getIterator(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Statistics_getIterator(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: hasNext
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Statistics_hasNext(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Statistics_hasNext(
JNIEnv* env, jobject, jlong pointer, jlong iteratorPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: getNext
- * Signature: (JJ)Lio/github/cvc5/api/Pair;
+ * Signature: (JJ)Lio/github/cvc5/Pair;
*/
-JNIEXPORT jobject JNICALL Java_io_github_cvc5_api_Statistics_getNext(
+JNIEXPORT jobject JNICALL Java_io_github_cvc5_Statistics_getNext(
JNIEnv* env, jobject, jlong, jlong iteratorPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
jobject longObject = env->NewObject(longClass, longConstructor, statPointer);
// Pair<String, Long> pair = new Pair<String, Long>(jName, longObject)
- jclass pairClass = env->FindClass("Lio/github/cvc5/api/Pair;");
+ jclass pairClass = env->FindClass("Lio/github/cvc5/Pair;");
jmethodID pairConstructor = env->GetMethodID(
pairClass, "<init>", "(Ljava/lang/Object;Ljava/lang/Object;)V");
jobject pair = env->NewObject(pairClass, pairConstructor, jName, longObject);
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: increment
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Statistics_increment(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Statistics_increment(
JNIEnv* env, jobject, jlong pointer, jlong iteratorPointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Statistics
+ * Class: io_github_cvc5_Statistics
* Method: deleteIteratorPointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Statistics_deleteIteratorPointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_Statistics_deleteIteratorPointer(
JNIEnv*, jobject, jlong iteratorPointer)
{
delete reinterpret_cast<Statistics::iterator*>(iteratorPointer);
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_SynthResult.h"
+#include "io_github_cvc5_SynthResult.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_SynthResult_deletePointer(
+JNIEXPORT void JNICALL Java_io_github_cvc5_SynthResult_deletePointer(
JNIEnv*, jobject, jlong pointer)
{
delete ((SynthResult*)pointer);
}
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: isNull
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_SynthResult_isNull(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_SynthResult_isNull(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
SynthResult* current = (SynthResult*)pointer;
}
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: hasSolution
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_SynthResult_hasSolution(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_SynthResult_hasSolution(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: hasNoSolution
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_SynthResult_hasNoSolution(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_SynthResult_hasNoSolution(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: isUnknown
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_SynthResult_isUnknown(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_SynthResult_isUnknown(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_SynthResult
+ * Class: io_github_cvc5_SynthResult
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_SynthResult_toString(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_SynthResult_toString(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
#include "api/cpp/cvc5.h"
#include "api_utilities.h"
-#include "io_github_cvc5_api_Term.h"
+#include "io_github_cvc5_Term.h"
using namespace cvc5;
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: deletePointer
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_io_github_cvc5_api_Term_deletePointer(JNIEnv* env,
+JNIEXPORT void JNICALL Java_io_github_cvc5_Term_deletePointer(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: equals
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_equals(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_equals(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: compareTo
* Signature: (JJ)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Term_compareTo(JNIEnv* env,
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Term_compareTo(JNIEnv* env,
jobject,
jlong pointer1,
jlong pointer2)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getNumChildren
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Term_getNumChildren(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_getNumChildren(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getChild
* Signature: (JI)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_getChild(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_getChild(JNIEnv* env,
jobject,
jlong pointer,
jint index)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getId
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_getId(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_getId(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getKind
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Term_getKind(JNIEnv* env,
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Term_getKind(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getSort
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_getSort(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_getSort(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: substitute
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Term_substitute__JJJ(JNIEnv* env,
+Java_io_github_cvc5_Term_substitute__JJJ(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer,
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: substitute
* Signature: (J[J[J)J
*/
JNIEXPORT jlong JNICALL
-Java_io_github_cvc5_api_Term_substitute__J_3J_3J(JNIEnv* env,
+Java_io_github_cvc5_Term_substitute__J_3J_3J(JNIEnv* env,
jobject,
jlong pointer,
jlongArray termPointers,
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: hasOp
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_hasOp(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_hasOp(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getOp
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_getOp(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_getOp(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: hasSymbol
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_hasSymbol(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_hasSymbol(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getSymbol
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Term_getSymbol(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Term_getSymbol(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isNull
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isNull(JNIEnv* env,
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isNull(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isConstArray
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isConstArray(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isConstArray(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getConstArrayBase
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_getConstArrayBase(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_getConstArrayBase(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: notTerm
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_notTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_notTerm(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: andTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_andTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_andTerm(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: orTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_orTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_orTerm(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: xorTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_xorTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_xorTerm(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: eqTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_eqTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_eqTerm(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: impTerm
* Signature: (JJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_impTerm(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_impTerm(JNIEnv* env,
jobject,
jlong pointer,
jlong termPointer)
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: iteTerm
* Signature: (JJJ)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_iteTerm(
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_iteTerm(
JNIEnv* env, jobject, jlong pointer, jlong thenPointer, jlong elsePointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: toString
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Term_toString(JNIEnv* env,
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Term_toString(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getRealOrIntegerValueSign
* Signature: (J)Z
*/
JNIEXPORT jint JNICALL
-Java_io_github_cvc5_api_Term_getRealOrIntegerValueSign(JNIEnv* env,
+Java_io_github_cvc5_Term_getRealOrIntegerValueSign(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isIntegerValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isIntegerValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isIntegerValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getIntegerValue
* Signature: (J)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Term_getIntegerValue(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Term_getIntegerValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isStringValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isStringValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isStringValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getStringValue
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Term_getStringValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_getStringValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isRealValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isRealValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isRealValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getRealValue
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Term_getRealValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_getRealValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isBooleanValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isBooleanValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isBooleanValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getBooleanValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_getBooleanValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_getBooleanValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isBitVectorValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isBitVectorValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isBitVectorValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getBitVectorValue
* Signature: (JI)Ljava/lang/String;
*/
-JNIEXPORT jstring JNICALL Java_io_github_cvc5_api_Term_getBitVectorValue(
+JNIEXPORT jstring JNICALL Java_io_github_cvc5_Term_getBitVectorValue(
JNIEnv* env, jobject, jlong pointer, jint base)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
/*
* Class: cvc5_Term
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isUninterpretedSortValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isUninterpretedSortValue(JNIEnv* env,
+Java_io_github_cvc5_Term_isUninterpretedSortValue(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getUninterpretedSortValue
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
-Java_io_github_cvc5_api_Term_getUninterpretedSortValue(JNIEnv* env,
+Java_io_github_cvc5_Term_getUninterpretedSortValue(JNIEnv* env,
jobject,
jlong pointer)
{
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isRoundingModeValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isRoundingModeValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isRoundingModeValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getRoundingModeValue
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_io_github_cvc5_api_Term_getRoundingModeValue(
+JNIEXPORT jint JNICALL Java_io_github_cvc5_Term_getRoundingModeValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isTupleValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isTupleValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isTupleValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getTupleValue
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Term_getTupleValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_getTupleValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointPosZero
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointPosZero(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointPosZero(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointNegZero
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointNegZero(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointNegZero(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointPosInf
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointPosInf(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointPosInf(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointNegInf
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointNegInf(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointNegInf(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointNaN
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointNaN(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointNaN(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isFloatingPointValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isFloatingPointValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isFloatingPointValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getFloatingPointValue
- * Signature: (J)Lio/github/cvc5/api/Triplet;
+ * Signature: (J)Lio/github/cvc5/Triplet;
*/
-JNIEXPORT jobject JNICALL Java_io_github_cvc5_api_Term_getFloatingPointValue(
+JNIEXPORT jobject JNICALL Java_io_github_cvc5_Term_getFloatingPointValue(
JNIEnv* env, jobject thisObject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
jobject t = env->NewObject(longClass, longConstructor, termPointer);
// Triplet triplet = new Triplet<Long, Long, Long>(e, s, t);
- jclass tripletClass = env->FindClass("Lio/github/cvc5/api/Triplet;");
+ jclass tripletClass = env->FindClass("Lio/github/cvc5/Triplet;");
jmethodID tripletConstructor = env->GetMethodID(
tripletClass,
"<init>",
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isSetValue
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
-Java_io_github_cvc5_api_Term_isSetValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_isSetValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getSetValue
* Signature: (J)[J
*/
JNIEXPORT jlongArray JNICALL
-Java_io_github_cvc5_api_Term_getSetValue(JNIEnv* env, jobject, jlong pointer)
+Java_io_github_cvc5_Term_getSetValue(JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
Term* current = reinterpret_cast<Term*>(pointer);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isSequenceValue
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isSequenceValue(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isSequenceValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getSequenceValue
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_api_Term_getSequenceValue(
+JNIEXPORT jlongArray JNICALL Java_io_github_cvc5_Term_getSequenceValue(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: isCardinalityConstraint
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_io_github_cvc5_api_Term_isCardinalityConstraint(
+JNIEXPORT jboolean JNICALL Java_io_github_cvc5_Term_isCardinalityConstraint(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: getCardinalityConstraint
- * Signature: (J)Lio/github/cvc5/api/Pair;
+ * Signature: (J)Lio/github/cvc5/Pair;
*/
-JNIEXPORT jobject JNICALL Java_io_github_cvc5_api_Term_getCardinalityConstraint(
+JNIEXPORT jobject JNICALL Java_io_github_cvc5_Term_getCardinalityConstraint(
JNIEnv* env, jobject, jlong pointer)
{
CVC5_JAVA_API_TRY_CATCH_BEGIN;
jobject s = env->NewObject(longClass, longConstructor, sortPointer);
// Pair pair = new Pair<Long, BigInteger>(s, u);
- jclass pairClass = env->FindClass("Lio/github/cvc5/api/Pair;");
+ jclass pairClass = env->FindClass("Lio/github/cvc5/Pair;");
jmethodID pairConstructor = env->GetMethodID(
pairClass, "<init>", "(Ljava/lang/Object;Ljava/lang/Object;)V");
jobject pair = env->NewObject(pairClass, pairConstructor, s, u);
}
/*
- * Class: io_github_cvc5_api_Term
+ * Class: io_github_cvc5_Term
* Method: iterator
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Term_iterator(JNIEnv* env,
+JNIEXPORT jlong JNICALL Java_io_github_cvc5_Term_iterator(JNIEnv* env,
jobject,
jlong pointer)
{
*/
package tests;
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.AfterEach;
*/
package tests;
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.util.Arrays;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
*/
package tests;
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
package tests;
-import static io.github.cvc5.api.Kind.*;
-import static io.github.cvc5.api.RoundingMode.*;
+import static io.github.cvc5.Kind.*;
+import static io.github.cvc5.RoundingMode.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
*/
package tests;
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
*/
package tests;
-import static io.github.cvc5.api.Kind.*;
+import static io.github.cvc5.Kind.*;
import static org.junit.jupiter.api.Assertions.*;
-import io.github.cvc5.api.*;
+import io.github.cvc5.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;