Package io.github.cvc5
Class TermManager
java.lang.Object
io.github.cvc5.TermManager
A cvc5 term manager.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Free the native resource associated with this pointer.protected void
deletePointer
(long pointer) Delete the native resource associated with the specified pointer.boolean
Get the Boolean sort.Get the integer sort.int
Get the number of indices for a given skolem id.long
Return the raw native pointer.Get the real sort.Get the regular expression sort.Get the floating-point rounding mode sort.Get a snapshot of the current state of the statistic values of this term manager.Get the string sort.mkAbstractSort
(SortKind kind) Create an abstract sort.mkArraySort
(Sort indexSort, Sort elemSort) Create an array sort.Create a bag sort.mkBitVector
(int size) Create a bit-vector constant of given size and value = 0.mkBitVector
(int size, long val) Create a bit-vector constant of given size and value.mkBitVector
(int size, String s, int base) Create a bit-vector constant of a given bit-width from a given string of base 2, 10 or 16.mkBitVectorSort
(int size) Create a bit-vector sort.mkBoolean
(boolean val) Create a Boolean constant.mkCardinalityConstraint
(Sort sort, int upperBound) Create a cardinality constraint for an uninterpreted sort.Create a free constant with a default symbol name.Create a free constant.mkConstArray
(Sort sort, Term val) Create a constant array with the provided constant value stored at every indexCreate a datatype constructor declaration.mkDatatypeDecl
(String name) Create a datatype declaration.mkDatatypeDecl
(String name, boolean isCoDatatype) Create a datatype declaration.mkDatatypeDecl
(String name, Sort[] params) Create a datatype declaration.mkDatatypeDecl
(String name, Sort[] params, boolean isCoDatatype) Create a datatype declaration.mkDatatypeSort
(DatatypeDecl dtypedecl) Create a datatype sort.Sort[]
mkDatatypeSorts
(DatatypeDecl[] dtypedecls) Create a vector of datatype sorts.mkEmptyBag
(Sort sort) Create a constant representing an empty bag of the given sort.mkEmptySequence
(Sort sort) Create an empty sequence of the given element sort.mkEmptySet
(Sort sort) Create a constant representing an empty set of the given sort.mkFalse()
Create a Booleanfalse
constant.mkFiniteFieldElem
(String val, Sort sort, int base) Create a finite field constant in a given field and for a given value.mkFiniteFieldSort
(String size, int base) Create a finite field sort.mkFloatingPoint
(int exp, int sig, Term val) Create a floating-point value from a bit-vector given in IEEE-754 format.mkFloatingPoint
(Term sign, Term exp, Term sig) Create a floating-point value from its three IEEE-754 bit-vector value components (sign bit, exponent, significand).mkFloatingPointNaN
(int exp, int sig) Create a not-a-number floating-point constant (SMT-LIB:NaN
).mkFloatingPointNegInf
(int exp, int sig) Create a negative infinity floating-point constant (SMT-LIB:-oo
).mkFloatingPointNegZero
(int exp, int sig) Create a negative zero floating-point constant (SMT-LIB:-zero
).mkFloatingPointPosInf
(int exp, int sig) Create a positive infinity floating-point constant (SMT-LIB:+oo
).mkFloatingPointPosZero
(int exp, int sig) Create a positive zero floating-point constant (SMT-LIB:+zero
).mkFloatingPointSort
(int exp, int sig) Create a floating-point sort.mkFunctionSort
(Sort[] sorts, Sort codomain) Create function sort.mkFunctionSort
(Sort domain, Sort codomain) Create function sort.mkInteger
(long val) Create an integer constant from a C++int
.Create an integer constant from a string.mkNullableIsNull
(Term term) Create a null tester for a nullable term.mkNullableIsSome
(Term term) Create a some tester for a nullable term.mkNullableLift
(Kind kind, Term[] args) Create a term that lifts kind to nullable terms.mkNullableNull
(Sort sort) Create a constant representing a null value of the given sort.mkNullableSome
(Term term) Create a nullable some term.mkNullableSort
(Sort sort) Create a nullable sort.mkNullableVal
(Term term) Create a selector for nullable term.Create an operator for a builtin Kind The Kind may not be the Kind for an indexed operator (e.g.,Kind.BITVECTOR_EXTRACT
).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 enumKind
for a description of the parameters.Create operator of Kind: TUPLE_PROJECT See enumKind
for a description of the parameters.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 enumKind
for a description of the parameters.Create operator of kind:Kind.DIVISIBLE
(to support arbitrary precision integers) See enumKind
for a description of the parameters.Create a sort parameter.mkParamSort
(String symbol) Create a sort parameter.mkPi()
Create a constant representing the number Pi.mkPredicateSort
(Sort[] sorts) Create a predicate sort.mkReal
(long val) Create a real constant from an integer.mkReal
(long num, long den) Create a real constant from a rational.Create a real constant from a string.mkRecordSort
(Pair<String, Sort>[] fields) Create a record sortCreate a regular expression all (re.all
) term.Create a regular expression allchar (re.allchar
) term.Create a regular expression none (re.none
) term.Create a rounding mode constant.mkSepEmp()
Create a separation logic empty term.Create a separation logic nil term.mkSequenceSort
(Sort elemSort) Create a sequence sort.Create a set sort.Create a skolemmkString
(int[] s) Create a String constant.Create a String constant.Create a String constant.Create 0-ary term of given kind.Create a unary term of given kind.Create n-ary term of given kind.Create binary term of given kind.Create ternary term of given kind.Create nullary term of given kind from a given operator.Create unary term of given kind from a given operator.Create n-ary term of given kind from a given operator.Create binary term of given kind from a given operator.Create ternary term of given kind from a given operator.mkTrue()
Create a Booleantrue
constant.Create a tuple term.mkTupleSort
(Sort[] sorts) Create a tuple sort.Create an uninterpreted sort.mkUninterpretedSort
(String symbol) Create an uninterpreted sort.mkUninterpretedSortConstructorSort
(int arity) Create a sort constructor sort.mkUninterpretedSortConstructorSort
(int arity, String symbol) Create a sort constructor sort.mkUniverseSet
(Sort sort) Create a universe set of the given sort.mkUnresolvedDatatypeSort
(String symbol) Create an unresolved datatype sort.mkUnresolvedDatatypeSort
(String symbol, int arity) Create an unresolved datatype sort.Create a bound variable to be used in a binder (i.e., a quantifier, a lambda, or a witness binder).Create a bound variable to be used in a binder (i.e., a quantifier, a lambda, or a witness binder).toString()
Return a string representation of the pointer.protected String
toString
(long pointer) Return a string representation of the specified native pointer.
-
Field Details
-
pointer
protected long pointerThe raw native pointer value.
-
-
Constructor Details
-
TermManager
public TermManager()Create a term manager instance.
-
-
Method Details
-
deletePointer
protected void deletePointer(long pointer) Delete the native resource associated with the specified pointer.Subclasses must implement this method to provide resource-specific cleanup logic.
- Parameters:
pointer
- the native pointer to delete
-
toString
Return a string representation of the specified native pointer.Subclasses must implement this method to convert the native pointer into a meaningful string.
- Parameters:
pointer
- the native pointer- Returns:
- a string representation of the pointer
-
equals
-
getStatistics
Get a snapshot of the current state of the statistic values of this term manager. Term manager statistics are independent from any solver instance. The returned object is completely decoupled from the term manager and will not change when the solver is used again.- Returns:
- A snapshot of the current state of the statistic values.
-
getBooleanSort
Get the Boolean sort.- Returns:
- Sort Boolean.
-
getIntegerSort
Get the integer sort.- Returns:
- Sort Integer.
-
getRealSort
Get the real sort.- Returns:
- Sort Real.
-
getRegExpSort
Get the regular expression sort.- Returns:
- Sort RegExp.
-
getRoundingModeSort
Get the floating-point rounding mode sort.- Returns:
- Sort RoundingMode.
- Throws:
CVC5ApiException
- on error
-
getStringSort
Get the string sort.- Returns:
- Sort String.
-
mkArraySort
Create an array sort.- Parameters:
indexSort
- The array index sort.elemSort
- The array element sort.- Returns:
- The array sort.
-
mkBitVectorSort
Create a bit-vector sort.- Parameters:
size
- The bit-width of the bit-vector sort.- Returns:
- The bit-vector sort.
- Throws:
CVC5ApiException
- on error
-
mkFiniteFieldSort
Create a finite field sort.- Parameters:
size
- The size of the finite field sort.base
- The base of the string representation.- Returns:
- The finite field sort.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPointSort
Create a floating-point sort.- Parameters:
exp
- The bit-width of the exponent of the floating-point sort.sig
- The bit-width of the significand of the floating-point sort.- Returns:
- The floating-point sort.
- Throws:
CVC5ApiException
- on error
-
mkDatatypeSort
Create a datatype sort.- Parameters:
dtypedecl
- The datatype declaration from which the sort is created.- Returns:
- The datatype sort.
- Throws:
CVC5ApiException
- on error
-
mkDatatypeSorts
Create a vector of datatype sorts. The names of the datatype declarations must be distinct.- Parameters:
dtypedecls
- The datatype declarations from which the sort is created.- Returns:
- The datatype sorts.
- Throws:
CVC5ApiException
- on error
-
mkFunctionSort
Create function sort.- Parameters:
domain
- The sort of the fuction argument.codomain
- The sort of the function return value.- Returns:
- The function sort.
-
mkFunctionSort
Create function sort.- Parameters:
sorts
- The sort of the function arguments.codomain
- The sort of the function return value.- Returns:
- The function sort.
-
mkParamSort
Create a sort parameter.- Parameters:
symbol
- The name of the sort.- Returns:
- The sort parameter.
- Note:
- This method is experimental and may change in future versions.
-
mkParamSort
Create a sort parameter.- Returns:
- The sort parameter.
- Note:
- This method is experimental and may change in future versions.
-
mkSkolem
Create a skolem- Parameters:
skolemId
- The id of the skolem.indices
- The indices of the skolem.- Returns:
- The skolem.
- Note:
- This method is experimental and may change in future versions.
-
getNumIndicesForSkolemId
Get the number of indices for a given skolem id.- Parameters:
id
- The skolem id.- Returns:
- The number of indices for the given skolem id.
- Note:
- This method is experimental and may change in future versions.
-
mkPredicateSort
Create a predicate sort.- Parameters:
sorts
- The list of sorts of the predicate.- Returns:
- The predicate sort.
-
mkRecordSort
Create a record sort- Parameters:
fields
- The list of fields of the record.- Returns:
- The record sort.
- Note:
- This method is experimental and may change in future versions.
-
mkSetSort
Create a set sort.- Parameters:
elemSort
- The sort of the set elements.- Returns:
- The set sort.
-
mkBagSort
Create a bag sort.- Parameters:
elemSort
- The sort of the bag elements.- Returns:
- The bag sort.
-
mkSequenceSort
Create a sequence sort.- Parameters:
elemSort
- The sort of the sequence elements.- Returns:
- The sequence sort.
-
mkAbstractSort
Create an abstract sort. An abstract sort represents a sort for a given kind whose parameters and arguments are unspecified. TheSortKind
k must be the kind of a sort that can be abstracted, i.e., a sort that has indices or argument sorts. For example,SortKind.ARRAY_SORT
andSortKind.BITVECTOR_SORT
can be passed as theSortKind
k to this method, whileSortKind.INTEGER_SORT
andSortKind.STRING_SORT
cannot.- Parameters:
kind
- The kind of the abstract sort- Returns:
- The abstract sort.
- Note:
- Providing the kind
SortKind.ABSTRACT_SORT
as an argument to this method returns the (fully) unspecified sort, often denoted?
., Providing a kindk
that has no indices and a fixed arity of argument sorts will return the sort ofSortKind
k whose arguments are the unspecified sort. For example,mkAbstractSort(ARRAY_SORT)
will return the sort(ARRAY_SORT ? ?)
instead of the abstract sort whose abstract kind isSortKind.ABSTRACT_SORT
., This method is experimental and may change in future versions.
-
mkUninterpretedSort
Create an uninterpreted sort.- Parameters:
symbol
- The name of the sort.- Returns:
- The uninterpreted sort.
-
mkUninterpretedSort
Create an uninterpreted sort.- Returns:
- The uninterpreted sort.
-
mkUnresolvedDatatypeSort
Create an unresolved datatype sort. This is for creating yet unresolved sort placeholders for mutually recursive parametric datatypes.- Parameters:
symbol
- The symbol of the sort.arity
- The number of sort parameters of the sort.- Returns:
- The unresolved sort.
- Throws:
CVC5ApiException
- on error
-
mkUnresolvedDatatypeSort
Create an unresolved datatype sort. This is for creating yet unresolved sort placeholders for mutually recursive datatypes without sort parameters.- Parameters:
symbol
- The symbol of the sort.- Returns:
- The unresolved sort.
- Throws:
CVC5ApiException
- on error
-
mkUninterpretedSortConstructorSort
Create a sort constructor sort. An uninterpreted sort constructor is an uninterpreted sort with arity > 0.- Parameters:
arity
- The arity of the sort (must be > 0)symbol
- The symbol of the sort.- Returns:
- The sort constructor sort.
- Throws:
CVC5ApiException
- on error
-
mkUninterpretedSortConstructorSort
Create a sort constructor sort. An uninterpreted sort constructor is an uninterpreted sort with arity > 0.- Parameters:
arity
- The arity of the sort (must be > 0)- Returns:
- The sort constructor sort.
- Throws:
CVC5ApiException
- on error
-
mkTupleSort
Create a tuple sort.- Parameters:
sorts
- Of the elements of the tuple.- Returns:
- The tuple sort.
-
mkNullableSort
Create a nullable sort.- Parameters:
sort
- The sort of the element of the nullable.- Returns:
- The nullable sort.
-
mkTerm
Create 0-ary term of given kind.- Parameters:
kind
- The kind of the term.- Returns:
- The Term.
-
mkTerm
Create a unary term of given kind.- Parameters:
kind
- The kind of the term.child
- The child of the term.- Returns:
- The Term.
-
mkTerm
Create binary term of given kind.- Parameters:
kind
- The kind of the term.child1
- The first child of the term.child2
- The second child of the term.- Returns:
- The Term.
-
mkTerm
Create ternary term of given kind.- Parameters:
kind
- The kind of the term.child1
- The first child of the term.child2
- The second child of the term.child3
- The third child of the term.- Returns:
- The Term.
-
mkTerm
Create n-ary term of given kind.- Parameters:
kind
- The kind of the term.children
- The children of the term.- Returns:
- The Term.
-
mkTerm
Create nullary term of given kind from a given operator. Create operators withmkOp(Kind)
,mkOp(Kind, String)
,mkOp(Kind, int[])
.- Parameters:
op
- The operator.- Returns:
- The Term.
-
mkTerm
Create unary term of given kind from a given operator. Create operators withmkOp(Kind)
,mkOp(Kind, String)
,mkOp(Kind, int[])
.- Parameters:
op
- The operator.child
- The child of the term.- Returns:
- The Term.
-
mkTerm
Create binary term of given kind from a given operator. Create operators withmkOp(Kind)
,mkOp(Kind, String)
,mkOp(Kind, int[])
.- Parameters:
op
- The operator.child1
- The first child of the term.child2
- The second child of the term.- Returns:
- The Term.
-
mkTerm
Create ternary term of given kind from a given operator. Create operators withmkOp(Kind)
,mkOp(Kind, String)
,mkOp(Kind, int[])
.- Parameters:
op
- The operator.child1
- The first child of the term.child2
- The second child of the term.child3
- The third child of the term.- Returns:
- The Term.
-
mkTerm
Create n-ary term of given kind from a given operator. Create operators withmkOp(Kind)
,mkOp(Kind, String)
,mkOp(Kind, int[])
.- Parameters:
op
- The operator.children
- The children of the term.- Returns:
- The Term.
-
mkTuple
Create a tuple term. Terms are automatically converted if sorts are compatible.- Parameters:
terms
- The elements in the tuple.- Returns:
- The tuple Term.
-
mkNullableSome
Create a nullable some term.- Parameters:
term
- The element value.- Returns:
- the Element value wrapped in some constructor.
-
mkNullableVal
Create a selector for nullable term.- Parameters:
term
- A nullable term.- Returns:
- The element value of the nullable term.
-
mkNullableIsNull
Create a null tester for a nullable term.- Parameters:
term
- A nullable term.- Returns:
- A tester whether term is null.
-
mkNullableIsSome
Create a some tester for a nullable term.- Parameters:
term
- A nullable term.- Returns:
- A tester whether term is some.
-
mkNullableNull
Create a constant representing a null value of the given sort.- Parameters:
sort
- The sort of the Nullable element.- Returns:
- The null constant.
-
mkNullableLift
Create a term that lifts kind to nullable terms. Example: If we have the term ((_ nullable.lift +) x y), where x, y of type (Nullable Int), then kind would be ADD, and args would be [x, y]. This function would return (nullable.lift (lambda ((a Int) (b Int)) (+ a b)) x y)- Parameters:
kind
- The lifted operator.args
- The arguments of the lifted operator.- Returns:
- A term of Kind NULLABLE_LIFT where the first child is a lambda expression, and the remaining children are the original arguments.
-
mkOp
Create an operator for a builtin Kind The Kind may not be the Kind for an indexed operator (e.g.,Kind.BITVECTOR_EXTRACT
).- Parameters:
kind
- The kind to wrap.- Returns:
- The operator.
- Note:
- In this case, the Op simply wraps the Kind. The Kind can be used in mkTerm directly without creating an op first.
-
mkOp
Create operator of kind:-
Kind.DIVISIBLE
(to support arbitrary precision integers)
Kind
for a description of the parameters.- Parameters:
kind
- The kind of the operator.arg
- The string argument to this operator.- Returns:
- The operator.
-
-
mkOp
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
Kind
for a description of the parameters.- Parameters:
kind
- The kind of the operator.arg
- The unsigned int argument to this operator.- Returns:
- The operator.
- Throws:
CVC5ApiException
- on error
-
mkOp
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
Kind
for a description of the parameters.- Parameters:
kind
- The kind of the operator.arg1
- The first unsigned int argument to this operator.arg2
- The second unsigned int argument to this operator.- Returns:
- The operator.
- Throws:
CVC5ApiException
- on error
-
mkOp
Create operator of Kind:- TUPLE_PROJECT
Kind
for a description of the parameters.- Parameters:
kind
- The kind of the operator.args
- The arguments (indices) of the operator.- Returns:
- The operator.
- Throws:
CVC5ApiException
- on error
-
mkTrue
Create a Booleantrue
constant.- Returns:
- The true constant.
-
mkFalse
Create a Booleanfalse
constant.- Returns:
- The false constant.
-
mkBoolean
Create a Boolean constant.- Parameters:
val
- The value of the constant.- Returns:
- The Boolean constant.
-
mkPi
Create a constant representing the number Pi.- Returns:
- A constant representing Pi.
-
mkInteger
Create an integer constant from a string.- Parameters:
s
- The string representation of the constant, may represent an. integer (e.g., "123").- Returns:
- A constant of sort Integer assuming
s
represents an integer). - Throws:
CVC5ApiException
- on error
-
mkInteger
Create an integer constant from a C++int
.- Parameters:
val
- The value of the constant.- Returns:
- A constant of sort Integer.
-
mkReal
Create a real constant from a string.- Parameters:
s
- The string representation of the constant, may represent an. integer (e.g., "123") or real constant (e.g., "12.34" or "12/34").- Returns:
- A constant of sort Real.
- Throws:
CVC5ApiException
- on error
-
mkReal
Create a real constant from an integer.- Parameters:
val
- The value of the constant.- Returns:
- A constant of sort Integer.
-
mkReal
Create a real constant from a rational.- Parameters:
num
- The value of the numerator.den
- The value of the denominator.- Returns:
- A constant of sort Real.
-
mkRegexpNone
Create a regular expression none (re.none
) term.- Returns:
- The none term.
-
mkRegexpAll
Create a regular expression all (re.all
) term.- Returns:
- The all term.
-
mkRegexpAllchar
Create a regular expression allchar (re.allchar
) term.- Returns:
- The allchar term.
-
mkEmptySet
Create a constant representing an empty set of the given sort.- Parameters:
sort
- The sort of the set elements.- Returns:
- The empty set constant.
-
mkEmptyBag
Create a constant representing an empty bag of the given sort.- Parameters:
sort
- The sort of the bag elements.- Returns:
- The empty bag constant.
-
mkSepEmp
Create a separation logic empty term.- Returns:
- The separation logic empty term.
- Note:
- This method is experimental and may change in future versions.
-
mkSepNil
Create a separation logic nil term.- Parameters:
sort
- The sort of the nil term.- Returns:
- The separation logic nil term.
- Note:
- This method is experimental and may change in future versions.
-
mkString
Create a String constant.- Parameters:
s
- The string this constant represents.- Returns:
- The String constant.
-
mkString
Create a String constant.- Parameters:
s
- The string this constant represents.useEscSequences
- Determines whether escape sequences ins
should be converted to the corresponding unicode character.- Returns:
- The String constant.
-
mkString
Create a String constant.- Parameters:
s
- A list of unsigned (unicode) values this constant represents as string.- Returns:
- The String constant.
- Throws:
CVC5ApiException
- on error
-
mkEmptySequence
Create an empty sequence of the given element sort.- Parameters:
sort
- The element sort of the sequence.- Returns:
- The empty sequence with given element sort.
-
mkUniverseSet
Create a universe set of the given sort.- Parameters:
sort
- The sort of the set elements.- Returns:
- The universe set constant.
-
mkBitVector
Create a bit-vector constant of given size and value = 0.- Parameters:
size
- The bit-width of the bit-vector sort.- Returns:
- The bit-vector constant.
- Throws:
CVC5ApiException
- on error
-
mkBitVector
Create a bit-vector constant of given size and value.- Parameters:
size
- The bit-width of the bit-vector sort.val
- The value of the constant.- Returns:
- The bit-vector constant.
- Throws:
CVC5ApiException
- on error- Note:
- The given value must fit into a bit-vector of the given size.
-
mkBitVector
Create a bit-vector constant of a given bit-width from a given string of base 2, 10 or 16.- Parameters:
size
- The bit-width of the constant.s
- The string representation of the constant.base
- The base of the string representation (2, 10, or 16)- Returns:
- The bit-vector constant.
- Throws:
CVC5ApiException
- on error- Note:
- The given value must fit into a bit-vector of the given size.
-
mkFiniteFieldElem
Create a finite field constant in a given field and for a given value.- Parameters:
val
- The value of the constant.sort
- The sort of the finite field.base
- The base of the string representation.- Returns:
- The finite field constant.
- Throws:
CVC5ApiException
- on error- Note:
- The given value must fit into a the given finite field.
-
mkConstArray
Create a constant array with the provided constant value stored at every index- Parameters:
sort
- The sort of the constant array (must be an array sort)val
- The constant value to store (must match the sort's element sort).- Returns:
- The constant array term.
-
mkFloatingPointPosInf
Create a positive infinity floating-point constant (SMT-LIB:+oo
).- Parameters:
exp
- Number of bits in the exponent.sig
- Number of bits in the significand.- Returns:
- The floating-point constant.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPointNegInf
Create a negative infinity floating-point constant (SMT-LIB:-oo
).- Parameters:
exp
- Number of bits in the exponent.sig
- Number of bits in the significand.- Returns:
- The floating-point constant.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPointNaN
Create a not-a-number floating-point constant (SMT-LIB:NaN
).- Parameters:
exp
- Number of bits in the exponent.sig
- Number of bits in the significand.- Returns:
- The floating-point constant.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPointPosZero
Create a positive zero floating-point constant (SMT-LIB:+zero
).- Parameters:
exp
- Number of bits in the exponent.sig
- Number of bits in the significand.- Returns:
- The floating-point constant.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPointNegZero
Create a negative zero floating-point constant (SMT-LIB:-zero
).- Parameters:
exp
- Number of bits in the exponent.sig
- Number of bits in the significand.- Returns:
- The floating-point constant.
- Throws:
CVC5ApiException
- on error
-
mkRoundingMode
Create a rounding mode constant.- Parameters:
rm
- The floating point rounding mode this constant represents.- Returns:
- The rounding mode.
-
mkFloatingPoint
Create a floating-point value from a bit-vector given in IEEE-754 format.- Parameters:
exp
- Size of the exponent.sig
- Size of the significand.val
- Value of the floating-point constant as a bit-vector term.- Returns:
- The floating-point value.
- Throws:
CVC5ApiException
- on error
-
mkFloatingPoint
Create a floating-point value from its three IEEE-754 bit-vector value components (sign bit, exponent, significand).- Parameters:
sign
- The sign bit.exp
- The bit-vector representing the exponent.sig
- The bit-vector representing the significand.- Returns:
- The floating-point value.
- Throws:
CVC5ApiException
- on error
-
mkCardinalityConstraint
Create a cardinality constraint for an uninterpreted sort.- Parameters:
sort
- The sort the cardinality constraint is for.upperBound
- The upper bound on the cardinality of the sort.- Returns:
- The cardinality constraint.
- Throws:
CVC5ApiException
- on error- Note:
- This method is experimental and may change in future versions.
-
mkConst
Create a free constant. SMT-LIB:( declare-const <symbol> <sort> ) ( declare-fun <symbol> ( ) <sort> )
- Parameters:
sort
- The sort of the constant.symbol
- The name of the constant.- Returns:
- The first-order constant.
-
mkConst
Create a free constant with a default symbol name.- Parameters:
sort
- The sort of the constant.- Returns:
- The first-order constant.
-
mkVar
Create a bound variable to be used in a binder (i.e., a quantifier, a lambda, or a witness binder).- Parameters:
sort
- The sort of the variable.- Returns:
- The variable.
-
mkVar
Create a bound variable to be used in a binder (i.e., a quantifier, a lambda, or a witness binder).- Parameters:
sort
- The sort of the variable.symbol
- The name of the variable.- Returns:
- The variable.
-
mkDatatypeConstructorDecl
Create a datatype constructor declaration.- Parameters:
name
- The name of the datatype constructor.- Returns:
- The DatatypeConstructorDecl.
-
mkDatatypeDecl
Create a datatype declaration.- Parameters:
name
- The name of the datatype.- Returns:
- The DatatypeDecl.
-
mkDatatypeDecl
Create a datatype declaration.- Parameters:
name
- The name of the datatype.isCoDatatype
- True if a codatatype is to be constructed.- Returns:
- The DatatypeDecl.
-
mkDatatypeDecl
Create a datatype declaration. Create sorts parameter withmkParamSort(String)
.- Parameters:
name
- The name of the datatype.params
- A list of sort parameters.- Returns:
- The DatatypeDecl.
- Note:
- This method is experimental and may change in future versions.
-
mkDatatypeDecl
Create a datatype declaration. Create sorts parameter withmkParamSort(String)
.- Parameters:
name
- The name of the datatype.params
- A list of sort parameters.isCoDatatype
- True if a codatatype is to be constructed.- Returns:
- The DatatypeDecl.
-
getPointer
public long getPointer()Return the raw native pointer.- Returns:
- the pointer value
-
deletePointer
public void deletePointer()Free the native resource associated with this pointer.This method should be called to explicitly clean up the underlying native resource. It removes this instance from the
Context
, then invokes the subclass-defineddeletePointer(long)
method to perform the actual cleanup. -
toString
Return a string representation of the pointer.
-