public class Context
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier | Constructor and Description |
---|---|
|
Context() |
protected |
Context(long m_ctx) |
|
Context(java.util.Map<java.lang.String,java.lang.String> settings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<R extends Sort> |
AddRecDef(FuncDecl<R> f,
Expr<?>[] args,
Expr<R> body)
Bind a definition to a recursive function declaration.
|
Probe |
and(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value p1 and p2 evaluate to true . |
Tactic |
andThen(Tactic t1,
Tactic t2,
Tactic... ts)
Create a tactic that applies
t1 to a Goal and then
t2 to every subgoal produced by t1 |
java.lang.String |
benchmarkToSMTString(java.lang.String name,
java.lang.String logic,
java.lang.String status,
java.lang.String attributes,
Expr<BoolSort>[] assumptions,
Expr<BoolSort> formula)
Convert a benchmark into an SMT-LIB formatted string.
|
Expr<CharSort> |
charFromBv(BitVecExpr bv)
Create a character from a bit-vector (code point).
|
BitVecExpr |
charToBv(Expr<CharSort> ch)
Create a bit-vector (code point) from character.
|
IntExpr |
charToInt(Expr<CharSort> ch)
Create an integer (code point) from character.
|
void |
close()
Disposes of the context.
|
Tactic |
cond(Probe p,
Tactic t1,
Tactic t2)
Create a tactic that applies
t1 to a given goal if the
probe p evaluates to true and t2
otherwise. |
Probe |
constProbe(double val)
Create a probe that always evaluates to
val . |
Probe |
eq(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value returned by
p1 is equal to the value returned by p2 |
Tactic |
fail()
Create a tactic always fails.
|
Tactic |
failIf(Probe p)
Create a tactic that fails if the probe
p evaluates to
false. |
Tactic |
failIfNotDecided()
Create a tactic that fails if the goal is not trivially satisfiable (i.e.,
empty) or trivially unsatisfiable (i.e., contains `false').
|
Probe |
ge(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value returned by
p1 is greater than or equal the value returned by
p2 |
IDecRefQueue<ApplyResult> |
getApplyResultDRQ() |
IDecRefQueue<AST> |
getASTDRQ() |
IDecRefQueue<com.microsoft.z3.ASTMap> |
getASTMapDRQ() |
IDecRefQueue<ASTVector> |
getASTVectorDRQ() |
BoolSort |
getBoolSort()
Retrieves the Boolean sort of the context.
|
IDecRefQueue<Constructor<?>> |
getConstructorDRQ() |
IDecRefQueue<ConstructorList<?>> |
getConstructorListDRQ() |
IDecRefQueue<Fixedpoint> |
getFixedpointDRQ() |
IDecRefQueue<FuncInterp.Entry<?>> |
getFuncEntryDRQ() |
IDecRefQueue<FuncInterp<?>> |
getFuncInterpDRQ() |
IDecRefQueue<Goal> |
getGoalDRQ() |
IntSort |
getIntSort()
Retrieves the Integer sort of the context.
|
IDecRefQueue<Model> |
getModelDRQ() |
int |
getNumProbes()
The number of supported Probes.
|
int |
getNumTactics()
The number of supported tactics.
|
IDecRefQueue<Optimize> |
getOptimizeDRQ() |
IDecRefQueue<ParamDescrs> |
getParamDescrsDRQ() |
IDecRefQueue<Params> |
getParamsDRQ() |
java.lang.String |
getProbeDescription(java.lang.String name)
Returns a string containing a description of the probe with the given
name.
|
IDecRefQueue<Probe> |
getProbeDRQ() |
java.lang.String[] |
getProbeNames()
The names of all supported Probes.
|
RealSort |
getRealSort()
Retrieves the Real sort of the context.
|
ParamDescrs |
getSimplifyParameterDescriptions()
Retrieves parameter descriptions for simplifier.
|
IDecRefQueue<Solver> |
getSolverDRQ() |
IDecRefQueue<Statistics> |
getStatisticsDRQ() |
SeqSort<CharSort> |
getStringSort()
Retrieves the String sort of the context.
|
java.lang.String |
getTacticDescription(java.lang.String name)
Returns a string containing a description of the tactic with the given
name.
|
IDecRefQueue<Tactic> |
getTacticDRQ() |
java.lang.String[] |
getTacticNames()
The names of all supported tactics.
|
Probe |
gt(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value returned by
p1 is greater than the value returned by p2 |
void |
interrupt()
Interrupt the execution of a Z3 procedure.
|
SeqExpr<CharSort> |
intToString(Expr<IntSort> e)
Convert an integer expression to a string.
|
Probe |
le(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value returned by
p1 is less than or equal the value returned by
p2 |
Probe |
lt(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value returned by
p1 is less than the value returned by p2 |
<R extends ArithSort> |
mkAdd(Expr<? extends R>... t)
Create an expression representing
t[0] + t[1] + ... . |
<R extends Sort> |
mkAllcharRe(R s)
Create regular expression that accepts all characters
Corresponds to re.allchar
|
BoolExpr |
mkAnd(Expr<BoolSort>... t)
Create an expression representing
t[0] and t[1] and ... . |
<R extends Sort> |
mkApp(FuncDecl<R> f,
Expr<?>... args)
Create a new function application.
|
<D extends Sort,R extends Sort> |
mkArrayConst(java.lang.String name,
D domain,
R range)
Create an array constant.
|
<D extends Sort,R extends Sort> |
mkArrayConst(Symbol name,
D domain,
R range)
Create an array constant.
|
<D extends Sort,R extends Sort> |
mkArrayExt(Expr<ArraySort<D,R>> arg1,
Expr<ArraySort<D,R>> arg2)
Create Extentionality index.
|
<D extends Sort,R extends Sort> |
mkArraySort(D domain,
R range)
Create a new array sort.
|
<R extends Sort> |
mkArraySort(Sort[] domains,
R range)
Create a new array sort.
|
<R extends Sort> |
mkAt(Expr<SeqSort<R>> s,
Expr<IntSort> index)
Retrieve sequence of length one at index.
|
BoolExpr |
mkAtLeast(Expr<BoolSort>[] args,
int k)
Create an at-least-k constraint.
|
BoolExpr |
mkAtMost(Expr<BoolSort>[] args,
int k)
Create an at-most-k constraint.
|
BitVecSort |
mkBitVecSort(int size)
Create a new bit-vector sort.
|
BoolExpr |
mkBool(boolean value)
Creates a Boolean value.
|
BoolExpr |
mkBoolConst(java.lang.String name)
Create a Boolean constant.
|
BoolExpr |
mkBoolConst(Symbol name)
Create a Boolean constant.
|
BoolSort |
mkBoolSort()
Create a new Boolean sort.
|
<R extends Sort> |
mkBound(int index,
R ty)
Creates a new bound variable.
|
BitVecNum |
mkBV(int v,
int size)
Create a bit-vector numeral.
|
BitVecNum |
mkBV(long v,
int size)
Create a bit-vector numeral.
|
BitVecNum |
mkBV(java.lang.String v,
int size)
Create a bit-vector numeral.
|
IntExpr |
mkBV2Int(Expr<BitVecSort> t,
boolean signed)
Create an integer from the bit-vector argument
t . |
BitVecExpr |
mkBVAdd(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement addition.
|
BoolExpr |
mkBVAddNoOverflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2,
boolean isSigned)
Create a predicate that checks that the bit-wise addition does not
overflow.
|
BoolExpr |
mkBVAddNoUnderflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Create a predicate that checks that the bit-wise addition does not
underflow.
|
BitVecExpr |
mkBVAND(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise conjunction.
|
BitVecExpr |
mkBVASHR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Arithmetic shift right
Remarks: It is like logical shift right except
that the most significant bits of the result always copy the most
significant bit of the second argument.
|
BitVecExpr |
mkBVConst(java.lang.String name,
int size)
Creates a bit-vector constant.
|
BitVecExpr |
mkBVConst(Symbol name,
int size)
Creates a bit-vector constant.
|
BitVecExpr |
mkBVLSHR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Logical shift right
Remarks: It is equivalent to unsigned division by
2^x where \c x is the value of t2 . |
BitVecExpr |
mkBVMul(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement multiplication.
|
BoolExpr |
mkBVMulNoOverflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2,
boolean isSigned)
Create a predicate that checks that the bit-wise multiplication does not
overflow.
|
BoolExpr |
mkBVMulNoUnderflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Create a predicate that checks that the bit-wise multiplication does not
underflow.
|
BitVecExpr |
mkBVNAND(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise NAND.
|
BitVecExpr |
mkBVNeg(Expr<BitVecSort> t)
Standard two's complement unary minus.
|
BoolExpr |
mkBVNegNoOverflow(Expr<BitVecSort> t)
Create a predicate that checks that the bit-wise negation does not
overflow.
|
BitVecExpr |
mkBVNOR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise NOR.
|
BitVecExpr |
mkBVNot(Expr<BitVecSort> t)
Bitwise negation.
|
BitVecExpr |
mkBVOR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise disjunction.
|
BitVecExpr |
mkBVRedAND(Expr<BitVecSort> t)
Take conjunction of bits in a vector, return vector of length 1.
|
BitVecExpr |
mkBVRedOR(Expr<BitVecSort> t)
Take disjunction of bits in a vector, return vector of length 1.
|
BitVecExpr |
mkBVRotateLeft(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Rotate Left.
|
BitVecExpr |
mkBVRotateLeft(int i,
Expr<BitVecSort> t)
Rotate Left.
|
BitVecExpr |
mkBVRotateRight(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Rotate Right.
|
BitVecExpr |
mkBVRotateRight(int i,
Expr<BitVecSort> t)
Rotate Right.
|
BitVecExpr |
mkBVSDiv(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Signed division.
|
BoolExpr |
mkBVSDivNoOverflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Create a predicate that checks that the bit-wise signed division does not
overflow.
|
BoolExpr |
mkBVSGE(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement signed greater than or equal to.
|
BoolExpr |
mkBVSGT(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement signed greater-than.
|
BitVecExpr |
mkBVSHL(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Shift left.
|
BoolExpr |
mkBVSLE(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement signed less-than or equal to.
|
BoolExpr |
mkBVSLT(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement signed less-than
Remarks: The arguments must have the
same bit-vector sort.
|
BitVecExpr |
mkBVSMod(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement signed remainder (sign follows divisor).
|
BitVecExpr |
mkBVSRem(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Signed remainder.
|
BitVecExpr |
mkBVSub(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Two's complement subtraction.
|
BoolExpr |
mkBVSubNoOverflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Create a predicate that checks that the bit-wise subtraction does not
overflow.
|
BoolExpr |
mkBVSubNoUnderflow(Expr<BitVecSort> t1,
Expr<BitVecSort> t2,
boolean isSigned)
Create a predicate that checks that the bit-wise subtraction does not
underflow.
|
BitVecExpr |
mkBVUDiv(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned division.
|
BoolExpr |
mkBVUGE(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned greater than or equal to.
|
BoolExpr |
mkBVUGT(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned greater-than.
|
BoolExpr |
mkBVULE(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned less-than or equal to.
|
BoolExpr |
mkBVULT(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned less-than
Remarks: The arguments must have the same bit-vector
sort.
|
BitVecExpr |
mkBVURem(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Unsigned remainder.
|
BitVecExpr |
mkBVXNOR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise XNOR.
|
BitVecExpr |
mkBVXOR(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bitwise XOR.
|
BoolExpr |
mkCharLe(Expr<CharSort> ch1,
Expr<CharSort> ch2)
Create less than or equal to between two characters.
|
CharSort |
mkCharSort()
Creates character sort object.
|
<R extends Sort> |
mkComplement(Expr<ReSort<R>> re)
Create the complement regular expression.
|
BitVecExpr |
mkConcat(Expr<BitVecSort> t1,
Expr<BitVecSort> t2)
Bit-vector concatenation.
|
<R extends Sort> |
mkConcat(Expr<SeqSort<R>>... t)
Concatenate sequences.
|
<R extends Sort> |
mkConcat(ReExpr<R>... t)
Create the concatenation of regular languages.
|
<R extends Sort> |
mkConst(FuncDecl<R> f)
Creates a fresh constant from the FuncDecl
f . |
<R extends Sort> |
mkConst(java.lang.String name,
R range)
Creates a new Constant of sort
range and named
name . |
<R extends Sort> |
mkConst(Symbol name,
R range)
Creates a new Constant of sort
range and named
name . |
<D extends Sort,R extends Sort> |
mkConstArray(D domain,
Expr<R> v)
Create a constant array.
|
<R extends Sort> |
mkConstDecl(java.lang.String name,
R range)
Creates a new constant function declaration.
|
<R extends Sort> |
mkConstDecl(Symbol name,
R range)
Creates a new constant function declaration.
|
<R> Constructor<R> |
mkConstructor(java.lang.String name,
java.lang.String recognizer,
java.lang.String[] fieldNames,
Sort[] sorts,
int[] sortRefs)
Create a datatype constructor.
|
<R> Constructor<R> |
mkConstructor(Symbol name,
Symbol recognizer,
Symbol[] fieldNames,
Sort[] sorts,
int[] sortRefs)
Create a datatype constructor.
|
<R extends Sort> |
mkContains(Expr<SeqSort<R>> s1,
Expr<SeqSort<R>> s2)
Check for sequence containment of s2 in s1.
|
<R> DatatypeSort<R> |
mkDatatypeSort(java.lang.String name,
Constructor<R>[] constructors)
Create a new datatype sort.
|
<R> DatatypeSort<R> |
mkDatatypeSort(Symbol name,
Constructor<R>[] constructors)
Create a new datatype sort.
|
DatatypeSort<java.lang.Object>[] |
mkDatatypeSorts(java.lang.String[] names,
Constructor<java.lang.Object>[][] c)
Create mutually recursive data-types.
|
DatatypeSort<java.lang.Object>[] |
mkDatatypeSorts(Symbol[] names,
Constructor<java.lang.Object>[][] c)
Create mutually recursive datatypes.
|
<R extends Sort> |
mkDiff(Expr<ReSort<R>> a,
Expr<ReSort<R>> b)
Create a difference regular expression.
|
BoolExpr |
mkDistinct(Expr<?>... args)
Creates a
distinct term. |
<R extends ArithSort> |
mkDiv(Expr<? extends R> t1,
Expr<? extends R> t2)
Create an expression representing
t1 / t2 . |
<R extends Sort> |
mkEmptyRe(R s)
Create the empty regular expression.
|
<R extends Sort> |
mkEmptySeq(R s)
Create the empty sequence.
|
<D extends Sort> |
mkEmptySet(D domain)
Create an empty set.
|
<R> EnumSort<R> |
mkEnumSort(java.lang.String name,
java.lang.String... enumNames)
Create a new enumeration sort.
|
<R> EnumSort<R> |
mkEnumSort(Symbol name,
Symbol... enumNames)
Create a new enumeration sort.
|
BoolExpr |
mkEq(Expr<?> x,
Expr<?> y)
Creates the equality
x = y |
Quantifier |
mkExists(Expr<?>[] boundConstants,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Creates an existential quantifier using a list of constants that will form the set of bound variables.
|
Quantifier |
mkExists(Sort[] sorts,
Symbol[] names,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Creates an existential quantifier using de-Bruijn indexed variables.
|
<R extends Sort> |
mkExtract(Expr<SeqSort<R>> s,
Expr<IntSort> offset,
Expr<IntSort> length)
Extract subsequence.
|
BitVecExpr |
mkExtract(int high,
int low,
Expr<BitVecSort> t)
Bit-vector extraction.
|
BoolExpr |
mkFalse()
The false Term.
|
<R> FiniteDomainSort<R> |
mkFiniteDomainSort(java.lang.String name,
long size)
Create a new finite domain sort.
|
<R> FiniteDomainSort<R> |
mkFiniteDomainSort(Symbol name,
long size)
Create a new finite domain sort.
|
Fixedpoint |
mkFixedpoint()
Create a Fixedpoint context.
|
Quantifier |
mkForall(Expr<?>[] boundConstants,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Creates a universal quantifier using a list of constants that will form the set of bound variables.
|
Quantifier |
mkForall(Sort[] sorts,
Symbol[] names,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a universal Quantifier.
|
FPNum |
mkFP(boolean sgn,
int exp,
int sig,
FPSort s)
Create a numeral of FloatingPoint sort from a sign bit and two integers.
|
FPNum |
mkFP(boolean sgn,
long exp,
long sig,
FPSort s)
Create a numeral of FloatingPoint sort from a sign bit and two 64-bit integers.
|
FPNum |
mkFP(double v,
FPSort s)
Create a numeral of FloatingPoint sort from a double.
|
FPExpr |
mkFP(Expr<BitVecSort> sgn,
Expr<BitVecSort> sig,
Expr<BitVecSort> exp)
Create an expression of FloatingPoint sort from three bit-vector expressions.
|
FPNum |
mkFP(float v,
FPSort s)
Create a numeral of FloatingPoint sort from a float.
|
FPNum |
mkFP(int v,
FPSort s)
Create a numeral of FloatingPoint sort from an int.
|
FPExpr |
mkFPAbs(Expr<FPSort> t)
Floating-point absolute value
|
FPExpr |
mkFPAdd(Expr<FPRMSort> rm,
Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point addition
|
FPExpr |
mkFPDiv(Expr<FPRMSort> rm,
Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point division
|
BoolExpr |
mkFPEq(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point equality.
|
FPExpr |
mkFPFMA(Expr<FPRMSort> rm,
Expr<FPSort> t1,
Expr<FPSort> t2,
Expr<FPSort> t3)
Floating-point fused multiply-add
|
BoolExpr |
mkFPGEq(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point greater than or equal.
|
BoolExpr |
mkFPGt(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point greater than.
|
FPNum |
mkFPInf(FPSort s,
boolean negative)
Create a floating-point infinity of sort s.
|
BoolExpr |
mkFPIsInfinite(Expr<FPSort> t)
Predicate indicating whether t is a floating-point number representing +oo or -oo.
|
BoolExpr |
mkFPIsNaN(Expr<FPSort> t)
Predicate indicating whether t is a NaN.
|
BoolExpr |
mkFPIsNegative(Expr<FPSort> t)
Predicate indicating whether t is a negative floating-point number.
|
BoolExpr |
mkFPIsNormal(Expr<FPSort> t)
Predicate indicating whether t is a normal floating-point number
|
BoolExpr |
mkFPIsPositive(Expr<FPSort> t)
Predicate indicating whether t is a positive floating-point number.
|
BoolExpr |
mkFPIsSubnormal(Expr<FPSort> t)
Predicate indicating whether t is a subnormal floating-point number
|
BoolExpr |
mkFPIsZero(Expr<FPSort> t)
Predicate indicating whether t is a floating-point number with zero value, i.e., +0 or -0.
|
BoolExpr |
mkFPLEq(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point less than or equal.
|
BoolExpr |
mkFPLt(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point less than.
|
FPExpr |
mkFPMax(Expr<FPSort> t1,
Expr<FPSort> t2)
Maximum of floating-point numbers.
|
FPExpr |
mkFPMin(Expr<FPSort> t1,
Expr<FPSort> t2)
Minimum of floating-point numbers.
|
FPExpr |
mkFPMul(Expr<FPRMSort> rm,
Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point multiplication
|
FPNum |
mkFPNaN(FPSort s)
Create a NaN of sort s.
|
FPExpr |
mkFPNeg(Expr<FPSort> t)
Floating-point negation
|
FPNum |
mkFPNumeral(boolean sgn,
int exp,
int sig,
FPSort s)
Create a numeral of FloatingPoint sort from a sign bit and two integers.
|
FPNum |
mkFPNumeral(boolean sgn,
long exp,
long sig,
FPSort s)
Create a numeral of FloatingPoint sort from a sign bit and two 64-bit integers.
|
FPNum |
mkFPNumeral(double v,
FPSort s)
Create a numeral of FloatingPoint sort from a double.
|
FPNum |
mkFPNumeral(float v,
FPSort s)
Create a numeral of FloatingPoint sort from a float.
|
FPNum |
mkFPNumeral(int v,
FPSort s)
Create a numeral of FloatingPoint sort from an int.
|
FPExpr |
mkFPRem(Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point remainder
|
FPRMNum |
mkFPRNA()
Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.
|
FPRMNum |
mkFPRNE()
Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.
|
FPRMSort |
mkFPRoundingModeSort()
Create the floating-point RoundingMode sort.
|
FPRMNum |
mkFPRoundNearestTiesToAway()
Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.
|
FPRMExpr |
mkFPRoundNearestTiesToEven()
Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.
|
FPExpr |
mkFPRoundToIntegral(Expr<FPRMSort> rm,
Expr<FPSort> t)
Floating-point roundToIntegral.
|
FPRMNum |
mkFPRoundTowardNegative()
Create a numeral of RoundingMode sort which represents the RoundTowardNegative rounding mode.
|
FPRMNum |
mkFPRoundTowardPositive()
Create a numeral of RoundingMode sort which represents the RoundTowardPositive rounding mode.
|
FPRMNum |
mkFPRoundTowardZero()
Create a numeral of RoundingMode sort which represents the RoundTowardZero rounding mode.
|
FPRMNum |
mkFPRTN()
Create a numeral of RoundingMode sort which represents the RoundTowardNegative rounding mode.
|
FPRMNum |
mkFPRTP()
Create a numeral of RoundingMode sort which represents the RoundTowardPositive rounding mode.
|
FPRMNum |
mkFPRTZ()
Create a numeral of RoundingMode sort which represents the RoundTowardZero rounding mode.
|
FPSort |
mkFPSort(int ebits,
int sbits)
Create a FloatingPoint sort.
|
FPSort |
mkFPSort128()
Create the quadruple-precision (128-bit) FloatingPoint sort.
|
FPSort |
mkFPSort16()
Create the half-precision (16-bit) FloatingPoint sort.
|
FPSort |
mkFPSort32()
Create the single-precision (32-bit) FloatingPoint sort.
|
FPSort |
mkFPSort64()
Create the double-precision (64-bit) FloatingPoint sort.
|
FPSort |
mkFPSortDouble()
Create the double-precision (64-bit) FloatingPoint sort.
|
FPSort |
mkFPSortHalf()
Create the half-precision (16-bit) FloatingPoint sort.
|
FPSort |
mkFPSortQuadruple()
Create the quadruple-precision (128-bit) FloatingPoint sort.
|
FPSort |
mkFPSortSingle()
Create the single-precision (32-bit) FloatingPoint sort.
|
FPExpr |
mkFPSqrt(Expr<FPRMSort> rm,
Expr<FPSort> t)
Floating-point square root
|
FPExpr |
mkFPSub(Expr<FPRMSort> rm,
Expr<FPSort> t1,
Expr<FPSort> t2)
Floating-point subtraction
|
BitVecExpr |
mkFPToBV(Expr<FPRMSort> rm,
Expr<FPSort> t,
int sz,
boolean signed)
Conversion of a floating-point term into a bit-vector.
|
FPExpr |
mkFPToFP(Expr<BitVecSort> bv,
FPSort s)
Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.
|
FPExpr |
mkFPToFP(Expr<FPRMSort> rm,
Expr<BitVecSort> t,
FPSort s,
boolean signed)
Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.
|
BitVecExpr |
mkFPToFP(Expr<FPRMSort> rm,
Expr<IntSort> exp,
Expr<RealSort> sig,
FPSort s)
Conversion of a real-sorted significand and an integer-sorted exponent into a term of FloatingPoint sort.
|
FPExpr |
mkFPToFP(Expr<FPRMSort> rm,
FPExpr t,
FPSort s)
Conversion of a FloatingPoint term into another term of different FloatingPoint sort.
|
FPExpr |
mkFPToFP(Expr<FPRMSort> rm,
RealExpr t,
FPSort s)
Conversion of a term of real sort into a term of FloatingPoint sort.
|
FPExpr |
mkFPToFP(FPSort s,
Expr<FPRMSort> rm,
Expr<FPSort> t)
Conversion of a floating-point number to another FloatingPoint sort s.
|
BitVecExpr |
mkFPToIEEEBV(Expr<FPSort> t)
Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
|
RealExpr |
mkFPToReal(Expr<FPSort> t)
Conversion of a floating-point term into a real-numbered term.
|
FPNum |
mkFPZero(FPSort s,
boolean negative)
Create a floating-point zero of sort s.
|
<R extends Sort> |
mkFreshConst(java.lang.String prefix,
R range)
Creates a fresh Constant of sort
range and a name
prefixed with prefix . |
<R extends Sort> |
mkFreshConstDecl(java.lang.String prefix,
R range)
Creates a fresh constant function declaration with a name prefixed with
prefix . |
<R extends Sort> |
mkFreshFuncDecl(java.lang.String prefix,
Sort[] domain,
R range)
Creates a fresh function declaration with a name prefixed with
prefix . |
<R extends Sort> |
mkFullRe(R s)
Create the full regular expression.
|
<D extends Sort> |
mkFullSet(D domain)
Create the full set.
|
<R extends Sort> |
mkFuncDecl(java.lang.String name,
Sort[] domain,
R range)
Creates a new function declaration.
|
<R extends Sort> |
mkFuncDecl(java.lang.String name,
Sort domain,
R range)
Creates a new function declaration.
|
<R extends Sort> |
mkFuncDecl(Symbol name,
Sort[] domain,
R range)
Creates a new function declaration.
|
<R extends Sort> |
mkFuncDecl(Symbol name,
Sort domain,
R range)
Creates a new function declaration.
|
BoolExpr |
mkGe(Expr<? extends ArithSort> t1,
Expr<? extends ArithSort> t2)
Create an expression representing
t1 >= t2 |
Goal |
mkGoal(boolean models,
boolean unsatCores,
boolean proofs)
Creates a new Goal.
|
BoolExpr |
mkGt(Expr<? extends ArithSort> t1,
Expr<? extends ArithSort> t2)
Create an expression representing
t1 > t2 |
BoolExpr |
mkIff(Expr<BoolSort> t1,
Expr<BoolSort> t2)
Create an expression representing
t1 iff t2 . |
BoolExpr |
mkImplies(Expr<BoolSort> t1,
Expr<BoolSort> t2)
Create an expression representing
t1 -> t2 . |
<R extends Sort> |
mkIndexOf(Expr<SeqSort<R>> s,
Expr<SeqSort<R>> substr,
Expr<IntSort> offset)
Extract index of sub-string starting at offset.
|
<R extends Sort> |
mkInRe(Expr<SeqSort<R>> s,
Expr<ReSort<R>> re)
Check for regular expression membership.
|
IntNum |
mkInt(int v)
Create an integer numeral.
|
IntNum |
mkInt(long v)
Create an integer numeral.
|
IntNum |
mkInt(java.lang.String v)
Create an integer numeral.
|
BitVecExpr |
mkInt2BV(int n,
Expr<IntSort> t)
Create an
n bit bit-vector from the integer argument
t . |
RealExpr |
mkInt2Real(Expr<IntSort> t)
Coerce an integer to a real.
|
IntExpr |
mkIntConst(java.lang.String name)
Creates an integer constant.
|
IntExpr |
mkIntConst(Symbol name)
Creates an integer constant.
|
<R extends Sort> |
mkIntersect(Expr<ReSort<R>>... t)
Create the intersection of regular languages.
|
IntSort |
mkIntSort()
Create a new integer sort.
|
BoolExpr |
mkIsDigit(Expr<CharSort> ch)
Create a check if the character is a digit.
|
BoolExpr |
mkIsInteger(Expr<RealSort> t)
Creates an expression that checks whether a real number is an integer.
|
<R extends Sort> |
mkITE(Expr<BoolSort> t1,
Expr<? extends R> t2,
Expr<? extends R> t3)
Create an expression representing an if-then-else:
ite(t1, t2, t3) . |
<R extends Sort> |
mkLambda(Expr<?>[] boundConstants,
Expr<R> body)
Create a lambda expression.
|
<R extends Sort> |
mkLambda(Sort[] sorts,
Symbol[] names,
Expr<R> body)
Create a lambda expression.
|
BoolExpr |
mkLe(Expr<? extends ArithSort> t1,
Expr<? extends ArithSort> t2)
Create an expression representing
t1 <= t2 |
<R extends Sort> |
mkLength(Expr<SeqSort<R>> s)
Retrieve the length of a given sequence.
|
<R extends Sort> |
mkLinearOrder(R sort,
int index)
Creates or a linear order.
|
<R extends Sort> |
mkListSort(java.lang.String name,
R elemSort)
Create a new list sort.
|
<R extends Sort> |
mkListSort(Symbol name,
R elemSort)
Create a new list sort.
|
<R extends Sort> |
mkLoop(Expr<ReSort<R>> re,
int lo)
Take the lower-bounded Kleene star of a regular expression.
|
<R extends Sort> |
mkLoop(Expr<ReSort<R>> re,
int lo,
int hi)
Take the lower and upper-bounded Kleene star of a regular expression.
|
BoolExpr |
mkLt(Expr<? extends ArithSort> t1,
Expr<? extends ArithSort> t2)
Create an expression representing
t1 < t2 |
<D extends Sort,R1 extends Sort,R2 extends Sort> |
mkMap(FuncDecl<R2> f,
Expr<ArraySort<D,R1>>... args)
Maps f on the argument arrays.
|
IntExpr |
mkMod(Expr<IntSort> t1,
Expr<IntSort> t2)
Create an expression representing
t1 mod t2 . |
<R extends ArithSort> |
mkMul(Expr<? extends R>... t)
Create an expression representing
t[0] * t[1] * ... . |
BoolExpr |
mkNot(Expr<BoolSort> a)
Create an expression representing
not(a) . |
<R extends Sort> |
mkNth(Expr<SeqSort<R>> s,
Expr<IntSort> index)
Retrieve element at index.
|
<R extends Sort> |
mkNumeral(int v,
R ty)
Create a Term of a given sort.
|
<R extends Sort> |
mkNumeral(long v,
R ty)
Create a Term of a given sort.
|
<R extends Sort> |
mkNumeral(java.lang.String v,
R ty)
Create a Term of a given sort.
|
Optimize |
mkOptimize()
Create a Optimize context.
|
<R extends Sort> |
mkOption(Expr<ReSort<R>> re)
Create the optional regular expression.
|
BoolExpr |
mkOr(Expr<BoolSort>... t)
Create an expression representing
t[0] or t[1] or ... . |
Params |
mkParams()
Creates a new ParameterSet.
|
<R extends Sort> |
mkPartialOrder(R sort,
int index)
Creates or a partial order.
|
Pattern |
mkPattern(Expr<?>... terms)
Create a quantifier pattern.
|
BoolExpr |
mkPBEq(int[] coeffs,
Expr<BoolSort>[] args,
int k)
Create a pseudo-Boolean equal constraint.
|
BoolExpr |
mkPBGe(int[] coeffs,
Expr<BoolSort>[] args,
int k)
Create a pseudo-Boolean greater-or-equal constraint.
|
BoolExpr |
mkPBLe(int[] coeffs,
Expr<BoolSort>[] args,
int k)
Create a pseudo-Boolean less-or-equal constraint.
|
<R extends Sort> |
mkPlus(Expr<ReSort<R>> re)
Take the Kleene plus of a regular expression.
|
<R extends ArithSort> |
mkPower(Expr<? extends R> t1,
Expr<? extends R> t2)
Create an expression representing
t1 ^ t2 . |
<R extends Sort> |
mkPower(Expr<ReSort<R>> re,
int n)
Create power regular expression.
|
<R extends Sort> |
mkPrefixOf(Expr<SeqSort<R>> s1,
Expr<SeqSort<R>> s2)
Check for sequence prefix.
|
Probe |
mkProbe(java.lang.String name)
Creates a new Probe.
|
Quantifier |
mkQuantifier(boolean universal,
Expr<?>[] boundConstants,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a Quantifier
|
Quantifier |
mkQuantifier(boolean universal,
Sort[] sorts,
Symbol[] names,
Expr<BoolSort> body,
int weight,
Pattern[] patterns,
Expr<?>[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a Quantifier.
|
<R extends Sort> |
mkRange(Expr<SeqSort<CharSort>> lo,
Expr<SeqSort<CharSort>> hi)
Create a range expression.
|
RatNum |
mkReal(int v)
Create a real numeral.
|
RatNum |
mkReal(int num,
int den)
Create a real from a fraction.
|
RatNum |
mkReal(long v)
Create a real numeral.
|
RatNum |
mkReal(java.lang.String v)
Create a real numeral.
|
IntExpr |
mkReal2Int(Expr<RealSort> t)
Coerce a real to an integer.
|
RealExpr |
mkRealConst(java.lang.String name)
Creates a real constant.
|
RealExpr |
mkRealConst(Symbol name)
Creates a real constant.
|
RealSort |
mkRealSort()
Create a real sort.
|
<R extends Sort> |
mkRecFuncDecl(Symbol name,
Sort[] domain,
R range)
Creates a new recursive function declaration.
|
IntExpr |
mkRem(Expr<IntSort> t1,
Expr<IntSort> t2)
Create an expression representing
t1 rem t2 . |
BitVecExpr |
mkRepeat(int i,
Expr<BitVecSort> t)
Bit-vector repetition.
|
<R extends Sort> |
mkReplace(Expr<SeqSort<R>> s,
Expr<SeqSort<R>> src,
Expr<SeqSort<R>> dst)
Replace the first occurrence of src by dst in s.
|
<R extends Sort> |
mkReSort(R s)
Create a new regular expression sort
|
<D extends Sort,R extends Sort> |
mkSelect(Expr<ArraySort<D,R>> a,
Expr<D> i)
Array read.
|
<R extends Sort> |
mkSelect(Expr<ArraySort<Sort,R>> a,
Expr<?>[] args)
Array read.
|
<R extends Sort> |
mkSeqSort(R s)
Create a new sequence sort
|
<D extends Sort> |
mkSetAdd(Expr<ArraySort<D,BoolSort>> set,
Expr<D> element)
Add an element to the set.
|
<D extends Sort> |
mkSetComplement(Expr<ArraySort<D,BoolSort>> arg)
Take the complement of a set.
|
<D extends Sort> |
mkSetDel(Expr<ArraySort<D,BoolSort>> set,
Expr<D> element)
Remove an element from a set.
|
<D extends Sort> |
mkSetDifference(Expr<ArraySort<D,BoolSort>> arg1,
Expr<ArraySort<D,BoolSort>> arg2)
Take the difference between two sets.
|
<D extends Sort> |
mkSetIntersection(Expr<ArraySort<D,BoolSort>>... args)
Take the intersection of a list of sets.
|
<D extends Sort> |
mkSetMembership(Expr<D> elem,
Expr<ArraySort<D,BoolSort>> set)
Check for set membership.
|
<D extends Sort> |
mkSetSort(D ty)
Create a set type.
|
<D extends Sort> |
mkSetSubset(Expr<ArraySort<D,BoolSort>> arg1,
Expr<ArraySort<D,BoolSort>> arg2)
Check for subsetness of sets.
|
<D extends Sort> |
mkSetUnion(Expr<ArraySort<D,BoolSort>>... args)
Take the union of a list of sets.
|
BitVecExpr |
mkSignExt(int i,
Expr<BitVecSort> t)
Bit-vector sign extension.
|
Solver |
mkSimpleSolver()
Creates a new (incremental) solver.
|
Solver |
mkSolver()
Creates a new (incremental) solver.
|
Solver |
mkSolver(java.lang.String logic)
Creates a new (incremental) solver.
|
Solver |
mkSolver(Symbol logic)
Creates a new (incremental) solver.
|
Solver |
mkSolver(Tactic t)
Creates a solver that is implemented using the given tactic.
|
<R extends Sort> |
mkStar(Expr<ReSort<R>> re)
Take the Kleene star of a regular expression.
|
<D extends Sort,R extends Sort> |
mkStore(Expr<ArraySort<D,R>> a,
Expr<D> i,
Expr<R> v)
Array update.
|
<R extends Sort> |
mkStore(Expr<ArraySort<Sort,R>> a,
Expr<?>[] args,
Expr<R> v)
Array update.
|
SeqExpr<CharSort> |
mkString(java.lang.String s)
Create a string constant.
|
BoolExpr |
MkStringLe(SeqSort<CharSort> s1,
SeqSort<CharSort> s2)
Check if the string s1 is lexicographically less or equal to s2.
|
BoolExpr |
MkStringLt(SeqSort<CharSort> s1,
SeqSort<CharSort> s2)
Check if the string s1 is lexicographically strictly less than s2.
|
SeqSort<CharSort> |
mkStringSort()
Create a new string sort
|
<R extends ArithSort> |
mkSub(Expr<? extends R>... t)
Create an expression representing
t[0] - t[1] - ... . |
<R extends Sort> |
mkSuffixOf(Expr<SeqSort<R>> s1,
Expr<SeqSort<R>> s2)
Check for sequence suffix.
|
IntSymbol |
mkSymbol(int i)
Creates a new symbol using an integer.
|
StringSymbol |
mkSymbol(java.lang.String name)
Create a symbol using a string.
|
Tactic |
mkTactic(java.lang.String name)
Creates a new Tactic.
|
<D extends Sort,R extends Sort> |
mkTermArray(Expr<ArraySort<D,R>> array)
Access the array default value.
|
<R extends Sort> |
mkToRe(Expr<SeqSort<R>> s)
Convert a regular expression that accepts sequence s.
|
BoolExpr |
mkTrue()
The true Term.
|
TupleSort |
mkTupleSort(Symbol name,
Symbol[] fieldNames,
Sort[] fieldSorts)
Create a new tuple sort.
|
<R extends ArithSort> |
mkUnaryMinus(Expr<R> t)
Create an expression representing
-t . |
UninterpretedSort |
mkUninterpretedSort(java.lang.String str)
Create a new uninterpreted sort.
|
UninterpretedSort |
mkUninterpretedSort(Symbol s)
Create a new uninterpreted sort.
|
<R extends Sort> |
mkUnion(Expr<ReSort<R>>... t)
Create the union of regular languages.
|
<R extends Sort> |
mkUnit(Expr<R> elem)
Create the singleton sequence.
|
<F extends Sort,R extends Sort> |
mkUpdateField(FuncDecl<F> field,
Expr<R> t,
Expr<F> v)
Update a datatype field at expression t with value v.
|
BoolExpr |
mkXor(Expr<BoolSort> t1,
Expr<BoolSort> t2)
Create an expression representing
t1 xor t2 . |
BitVecExpr |
mkZeroExt(int i,
Expr<BitVecSort> t)
Bit-vector zero extension.
|
long |
nCtx() |
Probe |
not(Probe p)
Create a probe that evaluates to
true when the value p does not evaluate to true . |
Probe |
or(Probe p1,
Probe p2)
Create a probe that evaluates to
true when the value p1 or p2 evaluate to true . |
Tactic |
orElse(Tactic t1,
Tactic t2)
Create a tactic that first applies
t1 to a Goal and if
it fails then returns the result of t2 applied to the
Goal. |
Tactic |
parAndThen(Tactic t1,
Tactic t2)
Create a tactic that applies
t1 to a given goal and
then t2 to every subgoal produced by t1 . |
Tactic |
parOr(Tactic... t)
Create a tactic that applies the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail).
|
BoolExpr[] |
parseSMTLIB2File(java.lang.String fileName,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl<?>[] decls)
Parse the given file using the SMT-LIB2 parser.
|
BoolExpr[] |
parseSMTLIB2String(java.lang.String str,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl<?>[] decls)
Parse the given string using the SMT-LIB2 parser.
|
Tactic |
repeat(Tactic t,
int max)
Create a tactic that keeps applying
t until the goal
is not modified anymore or the maximum number of iterations max is reached. |
SeqExpr<CharSort> |
sbvToString(Expr<BitVecSort> e)
Convert an signed bitvector expression to a string.
|
void |
setPrintMode(Z3_ast_print_mode value)
Selects the format used for pretty-printing expressions.
|
java.lang.String |
SimplifyHelp()
Return a string describing all available parameters to
Expr.Simplify . |
Tactic |
skip()
Create a tactic that just returns the given goal.
|
IntExpr |
stringToInt(Expr<SeqSort<CharSort>> e)
Convert an integer expression to a string.
|
Tactic |
then(Tactic t1,
Tactic t2,
Tactic... ts)
Create a tactic that applies
t1 to a Goal and then
t2 to every subgoal produced by t1
Remarks: Shorthand for AndThen . |
Tactic |
tryFor(Tactic t,
int ms)
Create a tactic that applies
t to a goal for ms milliseconds. |
SeqExpr<CharSort> |
ubvToString(Expr<BitVecSort> e)
Convert an unsigned bitvector expression to a string.
|
long |
unwrapAST(AST a)
Unwraps an AST.
|
void |
updateParamValue(java.lang.String id,
java.lang.String value)
Update a mutable configuration parameter.
|
Tactic |
usingParams(Tactic t,
Params p)
Create a tactic that applies
t using the given set of
parameters p . |
Tactic |
when(Probe p,
Tactic t)
Create a tactic that applies
t to a given goal if the
probe p evaluates to true. |
Tactic |
with(Tactic t,
Params p)
Create a tactic that applies
t using the given set of
parameters p . |
AST |
wrapAST(long nativeObject)
Wraps an AST.
|
public Context()
protected Context(long m_ctx)
public Context(java.util.Map<java.lang.String,java.lang.String> settings)
Global.setParameter
public IntSymbol mkSymbol(int i)
public StringSymbol mkSymbol(java.lang.String name)
public BoolSort getBoolSort()
public IntSort getIntSort()
public RealSort getRealSort()
public BoolSort mkBoolSort()
public CharSort mkCharSort()
public UninterpretedSort mkUninterpretedSort(Symbol s)
public UninterpretedSort mkUninterpretedSort(java.lang.String str)
public IntSort mkIntSort()
public RealSort mkRealSort()
public BitVecSort mkBitVecSort(int size)
public <D extends Sort,R extends Sort> ArraySort<D,R> mkArraySort(D domain, R range)
public <R extends Sort> ArraySort<Sort,R> mkArraySort(Sort[] domains, R range)
public TupleSort mkTupleSort(Symbol name, Symbol[] fieldNames, Sort[] fieldSorts)
public <R> EnumSort<R> mkEnumSort(Symbol name, Symbol... enumNames)
public <R> EnumSort<R> mkEnumSort(java.lang.String name, java.lang.String... enumNames)
public <R extends Sort> ListSort<R> mkListSort(Symbol name, R elemSort)
public <R extends Sort> ListSort<R> mkListSort(java.lang.String name, R elemSort)
public <R> FiniteDomainSort<R> mkFiniteDomainSort(Symbol name, long size)
public <R> FiniteDomainSort<R> mkFiniteDomainSort(java.lang.String name, long size)
public <R> Constructor<R> mkConstructor(Symbol name, Symbol recognizer, Symbol[] fieldNames, Sort[] sorts, int[] sortRefs)
name
- constructor namerecognizer
- name of recognizer function.fieldNames
- names of the constructor fields.sorts
- field sorts, 0 if the field sort refers to a recursive sort.sortRefs
- reference to datatype sort that is an argument to the
constructor; if the corresponding sort reference is 0, then the value in sort_refs should be
an index referring to one of the recursive datatypes that is
declared.public <R> Constructor<R> mkConstructor(java.lang.String name, java.lang.String recognizer, java.lang.String[] fieldNames, Sort[] sorts, int[] sortRefs)
public <R> DatatypeSort<R> mkDatatypeSort(Symbol name, Constructor<R>[] constructors)
public <R> DatatypeSort<R> mkDatatypeSort(java.lang.String name, Constructor<R>[] constructors)
public DatatypeSort<java.lang.Object>[] mkDatatypeSorts(Symbol[] names, Constructor<java.lang.Object>[][] c)
names
- names of datatype sortsc
- list of constructors, one list per sort.public DatatypeSort<java.lang.Object>[] mkDatatypeSorts(java.lang.String[] names, Constructor<java.lang.Object>[][] c)
public <F extends Sort,R extends Sort> Expr<R> mkUpdateField(FuncDecl<F> field, Expr<R> t, Expr<F> v) throws Z3Exception
Z3Exception
public <R extends Sort> FuncDecl<R> mkFuncDecl(Symbol name, Sort[] domain, R range)
public <R extends Sort> FuncDecl<R> mkFuncDecl(Symbol name, Sort domain, R range)
public <R extends Sort> FuncDecl<R> mkFuncDecl(java.lang.String name, Sort[] domain, R range)
public <R extends Sort> FuncDecl<R> mkFuncDecl(java.lang.String name, Sort domain, R range)
public <R extends Sort> FuncDecl<R> mkRecFuncDecl(Symbol name, Sort[] domain, R range)
public <R extends Sort> void AddRecDef(FuncDecl<R> f, Expr<?>[] args, Expr<R> body)
public <R extends Sort> FuncDecl<R> mkFreshFuncDecl(java.lang.String prefix, Sort[] domain, R range)
prefix
.public <R extends Sort> FuncDecl<R> mkConstDecl(Symbol name, R range)
public <R extends Sort> FuncDecl<R> mkConstDecl(java.lang.String name, R range)
public <R extends Sort> FuncDecl<R> mkFreshConstDecl(java.lang.String prefix, R range)
prefix
.public <R extends Sort> Expr<R> mkBound(int index, R ty)
index
- The de-Bruijn index of the variablety
- The sort of the variable@SafeVarargs public final Pattern mkPattern(Expr<?>... terms)
public <R extends Sort> Expr<R> mkConst(Symbol name, R range)
range
and named
name
.public <R extends Sort> Expr<R> mkConst(java.lang.String name, R range)
range
and named
name
.public <R extends Sort> Expr<R> mkFreshConst(java.lang.String prefix, R range)
range
and a name
prefixed with prefix
.public <R extends Sort> Expr<R> mkConst(FuncDecl<R> f)
f
.f
- A decl of a 0-arity functionpublic BoolExpr mkBoolConst(java.lang.String name)
public IntExpr mkIntConst(java.lang.String name)
public RealExpr mkRealConst(java.lang.String name)
public BitVecExpr mkBVConst(Symbol name, int size)
public BitVecExpr mkBVConst(java.lang.String name, int size)
@SafeVarargs public final <R extends Sort> Expr<R> mkApp(FuncDecl<R> f, Expr<?>... args)
public BoolExpr mkTrue()
public BoolExpr mkFalse()
public BoolExpr mkBool(boolean value)
public <R extends Sort> Expr<R> mkITE(Expr<BoolSort> t1, Expr<? extends R> t2, Expr<? extends R> t3)
ite(t1, t2, t3)
.t1
- An expression with Boolean sortt2
- An expressiont3
- An expression with the same sort as t2
public BoolExpr mkIff(Expr<BoolSort> t1, Expr<BoolSort> t2)
t1 iff t2
.public BoolExpr mkImplies(Expr<BoolSort> t1, Expr<BoolSort> t2)
t1 -> t2
.public BoolExpr mkXor(Expr<BoolSort> t1, Expr<BoolSort> t2)
t1 xor t2
.@SafeVarargs public final BoolExpr mkAnd(Expr<BoolSort>... t)
t[0] and t[1] and ...
.@SafeVarargs public final BoolExpr mkOr(Expr<BoolSort>... t)
t[0] or t[1] or ...
.@SafeVarargs public final <R extends ArithSort> ArithExpr<R> mkAdd(Expr<? extends R>... t)
t[0] + t[1] + ...
.@SafeVarargs public final <R extends ArithSort> ArithExpr<R> mkMul(Expr<? extends R>... t)
t[0] * t[1] * ...
.@SafeVarargs public final <R extends ArithSort> ArithExpr<R> mkSub(Expr<? extends R>... t)
t[0] - t[1] - ...
.public <R extends ArithSort> ArithExpr<R> mkUnaryMinus(Expr<R> t)
-t
.public <R extends ArithSort> ArithExpr<R> mkDiv(Expr<? extends R> t1, Expr<? extends R> t2)
t1 / t2
.public IntExpr mkMod(Expr<IntSort> t1, Expr<IntSort> t2)
t1 mod t2
.
Remarks: The
arguments must have int type.public IntExpr mkRem(Expr<IntSort> t1, Expr<IntSort> t2)
t1 rem t2
.
Remarks: The
arguments must have int type.public <R extends ArithSort> ArithExpr<R> mkPower(Expr<? extends R> t1, Expr<? extends R> t2)
t1 ^ t2
.public BoolExpr mkLt(Expr<? extends ArithSort> t1, Expr<? extends ArithSort> t2)
t1 < t2
public BoolExpr mkLe(Expr<? extends ArithSort> t1, Expr<? extends ArithSort> t2)
t1 <= t2
public BoolExpr mkGt(Expr<? extends ArithSort> t1, Expr<? extends ArithSort> t2)
t1 > t2
public BoolExpr mkGe(Expr<? extends ArithSort> t1, Expr<? extends ArithSort> t2)
t1 >= t2
public RealExpr mkInt2Real(Expr<IntSort> t)
k
and asserting
MakeInt2Real(k) <= t1 < MkInt2Real(k)+1
. The argument
must be of integer sort.public IntExpr mkReal2Int(Expr<RealSort> t)
public BoolExpr mkIsInteger(Expr<RealSort> t)
public BitVecExpr mkBVNot(Expr<BitVecSort> t)
public BitVecExpr mkBVRedAND(Expr<BitVecSort> t)
public BitVecExpr mkBVRedOR(Expr<BitVecSort> t)
public BitVecExpr mkBVAND(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVOR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVXOR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVNAND(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVNOR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVXNOR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVNeg(Expr<BitVecSort> t)
public BitVecExpr mkBVAdd(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVSub(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVMul(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVUDiv(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1/t2
if \c t2 is different from zero. If t2
is
zero, then the result is undefined. The arguments must have the same
bit-vector sort.public BitVecExpr mkBVSDiv(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1/t2
if \c t2 is different from zero, and
t1*t2 >= 0
.
- The \c ceiling of t1/t2
if \c t2 is different from zero,
and t1*t2 < 0
.
If t2
is zero, then the result is undefined. The arguments
must have the same bit-vector sort.public BitVecExpr mkBVURem(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1 - (t1 /u t2) * t2
, where /u
represents
unsigned division. If t2
is zero, then the result is
undefined. The arguments must have the same bit-vector sort.public BitVecExpr mkBVSRem(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1 - (t1 /s t2) * t2
, where /s
represents
signed division. The most significant bit (sign) of the result is equal
to the most significant bit of \c t1.
If t2
is zero, then the result is undefined. The arguments
must have the same bit-vector sort.public BitVecExpr mkBVSMod(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t2
is zero, then the result is undefined. The arguments must
have the same bit-vector sort.public BoolExpr mkBVULT(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSLT(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVULE(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSLE(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVUGE(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSGE(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVUGT(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSGT(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkConcat(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
n1+n2
, where
n1
(n2
) is the size of t1
(t2
).public BitVecExpr mkExtract(int high, int low, Expr<BitVecSort> t)
high
down to low
from a bitvector of size m
to
yield a new bitvector of size n
, where
n = high - low + 1
. The argument t
must
have a bit-vector sort.public BitVecExpr mkSignExt(int i, Expr<BitVecSort> t)
m+i
, where \c m is
the size of the given bit-vector. The argument t
must
have a bit-vector sort.public BitVecExpr mkZeroExt(int i, Expr<BitVecSort> t)
m+i
,
where \c m is the size of the given bit-vector. The argument t
must have a bit-vector sort.public BitVecExpr mkRepeat(int i, Expr<BitVecSort> t)
t
must
have a bit-vector sort.public BitVecExpr mkBVSHL(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
2^x
where \c x is the value of t2
.
NB. The semantics of shift operations varies between environments. This
definition does not necessarily capture directly the semantics of the
programming language or assembly architecture you are modeling.
The arguments must have a bit-vector sort.public BitVecExpr mkBVLSHR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
2^x
where \c x is the value of t2
.
NB. The semantics of shift operations varies between environments. This
definition does not necessarily capture directly the semantics of the
programming language or assembly architecture you are modeling.
The arguments must have a bit-vector sort.public BitVecExpr mkBVASHR(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BitVecExpr mkBVRotateLeft(int i, Expr<BitVecSort> t)
t
must have a bit-vector sort.public BitVecExpr mkBVRotateRight(int i, Expr<BitVecSort> t)
t
must have a bit-vector sort.public BitVecExpr mkBVRotateLeft(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1
to the left
t2
times. The arguments must have the same bit-vector
sort.public BitVecExpr mkBVRotateRight(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
t1
to the
rightt2
times. The arguments must have the same
bit-vector sort.public BitVecExpr mkInt2BV(int n, Expr<IntSort> t)
n
bit bit-vector from the integer argument
t
.
Remarks: NB. This function is essentially treated
as uninterpreted. So you cannot expect Z3 to precisely reflect the
semantics of this function when solving constraints with this function.
The argument must be of integer sort.public IntExpr mkBV2Int(Expr<BitVecSort> t, boolean signed)
t
.
Remarks: If \c is_signed is false, then the bit-vector \c t1 is treated
as unsigned. So the result is non-negative and in the range
[0..2^N-1]
, where N are the number of bits in t
.
If \c is_signed is true, \c t1 is treated as a signed
bit-vector.
NB. This function is essentially treated as uninterpreted. So you cannot
expect Z3 to precisely reflect the semantics of this function when
solving constraints with this function.
The argument must be of bit-vector sort.public BoolExpr mkBVAddNoOverflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2, boolean isSigned)
public BoolExpr mkBVAddNoUnderflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSubNoOverflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVSubNoUnderflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2, boolean isSigned)
public BoolExpr mkBVSDivNoOverflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public BoolExpr mkBVNegNoOverflow(Expr<BitVecSort> t)
public BoolExpr mkBVMulNoOverflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2, boolean isSigned)
public BoolExpr mkBVMulNoUnderflow(Expr<BitVecSort> t1, Expr<BitVecSort> t2)
public <D extends Sort,R extends Sort> ArrayExpr<D,R> mkArrayConst(Symbol name, D domain, R range)
public <D extends Sort,R extends Sort> ArrayExpr<D,R> mkArrayConst(java.lang.String name, D domain, R range)
public <D extends Sort,R extends Sort> Expr<R> mkSelect(Expr<ArraySort<D,R>> a, Expr<D> i)
a
is the array and
i
is the index of the array that gets read.
The node a
must have an array sort
[domain -> range]
, and i
must have the sort
domain
. The sort of the result is range
.public <R extends Sort> Expr<R> mkSelect(Expr<ArraySort<Sort,R>> a, Expr<?>[] args)
a
is the array and
args
are the indices of the array that gets read.
The node a
must have an array sort
[domains -> range]
, and args
must have the sorts
domains
. The sort of the result is range
.public <D extends Sort,R extends Sort> ArrayExpr<D,R> mkStore(Expr<ArraySort<D,R>> a, Expr<D> i, Expr<R> v)
a
must have an array sort
[domain -> range]
, i
must have sort
domain
, v
must have sort range. The sort of the
result is [domain -> range]
. The semantics of this function
is given by the theory of arrays described in the SMT-LIB standard. See
http://smtlib.org for more details. The result of this function is an
array that is equal to a
(with respect to
select
) on all indices except for i
, where it
maps to v
(and the select
of a
with respect to i
may be a different value).public <R extends Sort> ArrayExpr<Sort,R> mkStore(Expr<ArraySort<Sort,R>> a, Expr<?>[] args, Expr<R> v)
a
must have an array sort
[domains -> range]
, i
must have sort
domain
, v
must have sort range. The sort of the
result is [domains -> range]
. The semantics of this function
is given by the theory of arrays described in the SMT-LIB standard. See
http://smtlib.org for more details. The result of this function is an
array that is equal to a
(with respect to
select
) on all indices except for args
, where it
maps to v
(and the select
of a
with respect to args
may be a different value).public <D extends Sort,R extends Sort> ArrayExpr<D,R> mkConstArray(D domain, Expr<R> v)
select
on an arbitrary index produces the value
v
.@SafeVarargs public final <D extends Sort,R1 extends Sort,R2 extends Sort> ArrayExpr<D,R2> mkMap(FuncDecl<R2> f, Expr<ArraySort<D,R1>>... args)
args
must be of an array sort
[domain_i -> range_i]
. The function declaration
f
must have type range_1 .. range_n -> range
.
v
must have sort range. The sort of the result is
[domain_i -> range]
.public <D extends Sort,R extends Sort> Expr<R> mkTermArray(Expr<ArraySort<D,R>> array)
public <D extends Sort,R extends Sort> Expr<D> mkArrayExt(Expr<ArraySort<D,R>> arg1, Expr<ArraySort<D,R>> arg2)
public <D extends Sort> ArrayExpr<D,BoolSort> mkSetAdd(Expr<ArraySort<D,BoolSort>> set, Expr<D> element)
public <D extends Sort> ArrayExpr<D,BoolSort> mkSetDel(Expr<ArraySort<D,BoolSort>> set, Expr<D> element)
@SafeVarargs public final <D extends Sort> ArrayExpr<D,BoolSort> mkSetUnion(Expr<ArraySort<D,BoolSort>>... args)
@SafeVarargs public final <D extends Sort> ArrayExpr<D,BoolSort> mkSetIntersection(Expr<ArraySort<D,BoolSort>>... args)
public <D extends Sort> ArrayExpr<D,BoolSort> mkSetDifference(Expr<ArraySort<D,BoolSort>> arg1, Expr<ArraySort<D,BoolSort>> arg2)
public <D extends Sort> ArrayExpr<D,BoolSort> mkSetComplement(Expr<ArraySort<D,BoolSort>> arg)
public <D extends Sort> BoolExpr mkSetMembership(Expr<D> elem, Expr<ArraySort<D,BoolSort>> set)
public <D extends Sort> BoolExpr mkSetSubset(Expr<ArraySort<D,BoolSort>> arg1, Expr<ArraySort<D,BoolSort>> arg2)
public SeqExpr<CharSort> intToString(Expr<IntSort> e)
public SeqExpr<CharSort> ubvToString(Expr<BitVecSort> e)
public SeqExpr<CharSort> sbvToString(Expr<BitVecSort> e)
public IntExpr stringToInt(Expr<SeqSort<CharSort>> e)
@SafeVarargs public final <R extends Sort> SeqExpr<R> mkConcat(Expr<SeqSort<R>>... t)
public <R extends Sort> IntExpr mkLength(Expr<SeqSort<R>> s)
public <R extends Sort> BoolExpr mkPrefixOf(Expr<SeqSort<R>> s1, Expr<SeqSort<R>> s2)
public <R extends Sort> BoolExpr mkSuffixOf(Expr<SeqSort<R>> s1, Expr<SeqSort<R>> s2)
public <R extends Sort> BoolExpr mkContains(Expr<SeqSort<R>> s1, Expr<SeqSort<R>> s2)
public BoolExpr MkStringLt(SeqSort<CharSort> s1, SeqSort<CharSort> s2)
public BoolExpr MkStringLe(SeqSort<CharSort> s1, SeqSort<CharSort> s2)
public <R extends Sort> SeqExpr<R> mkAt(Expr<SeqSort<R>> s, Expr<IntSort> index)
public <R extends Sort> Expr<R> mkNth(Expr<SeqSort<R>> s, Expr<IntSort> index)
public <R extends Sort> SeqExpr<R> mkExtract(Expr<SeqSort<R>> s, Expr<IntSort> offset, Expr<IntSort> length)
public <R extends Sort> IntExpr mkIndexOf(Expr<SeqSort<R>> s, Expr<SeqSort<R>> substr, Expr<IntSort> offset)
public <R extends Sort> SeqExpr<R> mkReplace(Expr<SeqSort<R>> s, Expr<SeqSort<R>> src, Expr<SeqSort<R>> dst)
public <R extends Sort> ReExpr<R> mkToRe(Expr<SeqSort<R>> s)
public <R extends Sort> BoolExpr mkInRe(Expr<SeqSort<R>> s, Expr<ReSort<R>> re)
public <R extends Sort> ReExpr<R> mkStar(Expr<ReSort<R>> re)
public <R extends Sort> ReExpr<R> mkPower(Expr<ReSort<R>> re, int n)
public <R extends Sort> ReExpr<R> mkLoop(Expr<ReSort<R>> re, int lo, int hi)
public <R extends Sort> ReExpr<R> mkLoop(Expr<ReSort<R>> re, int lo)
public <R extends Sort> ReExpr<R> mkPlus(Expr<ReSort<R>> re)
public <R extends Sort> ReExpr<R> mkOption(Expr<ReSort<R>> re)
public <R extends Sort> ReExpr<R> mkComplement(Expr<ReSort<R>> re)
@SafeVarargs public final <R extends Sort> ReExpr<R> mkConcat(ReExpr<R>... t)
@SafeVarargs public final <R extends Sort> ReExpr<R> mkUnion(Expr<ReSort<R>>... t)
@SafeVarargs public final <R extends Sort> ReExpr<R> mkIntersect(Expr<ReSort<R>>... t)
public <R extends Sort> ReExpr<R> mkDiff(Expr<ReSort<R>> a, Expr<ReSort<R>> b)
public <R extends Sort> ReExpr<R> mkEmptyRe(R s)
public <R extends Sort> ReExpr<R> mkFullRe(R s)
public <R extends Sort> ReExpr<R> mkAllcharRe(R s)
public <R extends Sort> ReExpr<R> mkRange(Expr<SeqSort<CharSort>> lo, Expr<SeqSort<CharSort>> hi)
public BoolExpr mkCharLe(Expr<CharSort> ch1, Expr<CharSort> ch2)
public IntExpr charToInt(Expr<CharSort> ch)
public BitVecExpr charToBv(Expr<CharSort> ch)
public Expr<CharSort> charFromBv(BitVecExpr bv)
public BoolExpr mkPBLe(int[] coeffs, Expr<BoolSort>[] args, int k)
public BoolExpr mkPBGe(int[] coeffs, Expr<BoolSort>[] args, int k)
public BoolExpr mkPBEq(int[] coeffs, Expr<BoolSort>[] args, int k)
public <R extends Sort> Expr<R> mkNumeral(java.lang.String v, R ty)
v
- A string representing the term value in decimal notation. If the given sort is a real, then the
Term can be a rational, that is, a string of the form
[num]* / [num]*
.ty
- The sort of the
numeral. In the current implementation, the given sort can be an int,
real, or bit-vectors of arbitrary size.v
and sort ty
public <R extends Sort> Expr<R> mkNumeral(int v, R ty)
MakeNumeral
since it is not necessary to parse a string.v
- Value of the numeralty
- Sort of the numeralv
and type ty
public <R extends Sort> Expr<R> mkNumeral(long v, R ty)
MakeNumeral
since it is not necessary to parse a string.v
- Value of the numeralty
- Sort of the numeralv
and type ty
public RatNum mkReal(int num, int den)
num
- numerator of rational.den
- denominator of rational.num
/den
and sort RealmkNumeral(String,Sort)
public RatNum mkReal(java.lang.String v)
v
- A string representing the Term value in decimal notation.v
and sort Realpublic RatNum mkReal(int v)
v
- value of the numeral.v
and sort Realpublic RatNum mkReal(long v)
v
- value of the numeral.v
and sort Realpublic IntNum mkInt(java.lang.String v)
v
- A string representing the Term value in decimal notation.public IntNum mkInt(int v)
v
- value of the numeral.v
and sort Integerpublic IntNum mkInt(long v)
v
- value of the numeral.v
and sort Integerpublic BitVecNum mkBV(java.lang.String v, int size)
v
- A string representing the value in decimal notation.size
- the size of the bit-vectorpublic BitVecNum mkBV(int v, int size)
v
- value of the numeral.size
- the size of the bit-vectorpublic BitVecNum mkBV(long v, int size)
v
- value of the numeral. *size
- the size of the bit-vectorpublic Quantifier mkForall(Sort[] sorts, Symbol[] names, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
sorts
- the sorts of the bound variables.names
- names of the bound variablesbody
- the body of the quantifier.weight
- quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.patterns
- array containing the patterns created using MkPattern
.noPatterns
- array containing the anti-patterns created using MkPattern
.quantifierID
- optional symbol to track quantifier.skolemID
- optional symbol to track skolem constants.weight
is the weight, patterns
is
an array of patterns, sorts
is an array with the sorts
of the bound variables, names
is an array with the
'names' of the bound variables, and body
is the body
of the quantifier. Quantifiers are associated with weights indicating the
importance of using the quantifier during instantiation.
Note that the bound variables are de-Bruijn indices created using mkBound(int, R)
.
Z3 applies the convention that the last element in names
and
sorts
refers to the variable with index 0, the second to last element
of names
and sorts
refers to the variable
with index 1, etc.public Quantifier mkForall(Expr<?>[] boundConstants, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
#mkForall(Sort[],Symbol[],Expr,int,Pattern[],Expr>[],Symbol,Symbol)
public Quantifier mkExists(Sort[] sorts, Symbol[] names, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
#mkForall(Sort[],Symbol[],Expr,int,Pattern[],Expr>[],Symbol,Symbol)
public Quantifier mkExists(Expr<?>[] boundConstants, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
#mkForall(Sort[],Symbol[],Expr,int,Pattern[],Expr>[],Symbol,Symbol)
public Quantifier mkQuantifier(boolean universal, Sort[] sorts, Symbol[] names, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
#mkForall(Sort[],Symbol[],Expr,int,Pattern[],Expr>[],Symbol,Symbol)
public Quantifier mkQuantifier(boolean universal, Expr<?>[] boundConstants, Expr<BoolSort> body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
#mkForall(Sort[],Symbol[],Expr,int,Pattern[],Expr>[],Symbol,Symbol)
public <R extends Sort> Lambda<R> mkLambda(Sort[] sorts, Symbol[] names, Expr<R> body)
sorts
is an array
with the sorts of the bound variables, names
is an array with the
'names' of the bound variables, and body
is the body of the
lambda.
Note that the bound variables are de-Bruijn indices created using mkBound(int, R)
Z3 applies the convention that the last element in names
and
sorts
refers to the variable with index 0, the second to last element
of names
and sorts
refers to the variable
with index 1, etc.sorts
- the sorts of the bound variables.names
- names of the bound variables.body
- the body of the quantifier.public <R extends Sort> Lambda<R> mkLambda(Expr<?>[] boundConstants, Expr<R> body)
public void setPrintMode(Z3_ast_print_mode value)
public java.lang.String benchmarkToSMTString(java.lang.String name, java.lang.String logic, java.lang.String status, java.lang.String attributes, Expr<BoolSort>[] assumptions, Expr<BoolSort> formula)
name
- Name of the benchmark. The argument is optional.logic
- The benchmark logic.status
- The status string (sat, unsat, or unknown)attributes
- Other attributes, such as source, difficulty or
category.assumptions
- Auxiliary assumptions.formula
- Formula to be checked for consistency in conjunction with assumptions.public BoolExpr[] parseSMTLIB2String(java.lang.String str, Symbol[] sortNames, Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)
public BoolExpr[] parseSMTLIB2File(java.lang.String fileName, Symbol[] sortNames, Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)
public Goal mkGoal(boolean models, boolean unsatCores, boolean proofs)
proofs
is set
to true here.models
- Indicates whether model generation should be enabled.unsatCores
- Indicates whether unsat core generation should be enabled.proofs
- Indicates whether proof generation should be
enabled.public Params mkParams()
public int getNumTactics()
public java.lang.String[] getTacticNames()
public java.lang.String getTacticDescription(java.lang.String name)
public Tactic mkTactic(java.lang.String name)
public Tactic andThen(Tactic t1, Tactic t2, Tactic... ts)
t1
to a Goal and then
t2
to every subgoal produced by t1
public Tactic then(Tactic t1, Tactic t2, Tactic... ts)
t1
to a Goal and then
t2
to every subgoal produced by t1
Remarks: Shorthand for AndThen
.public Tactic orElse(Tactic t1, Tactic t2)
t1
to a Goal and if
it fails then returns the result of t2
applied to the
Goal.public Tactic tryFor(Tactic t, int ms)
t
to a goal for ms
milliseconds.
Remarks: If t
does not
terminate within ms
milliseconds, then it fails.public Tactic when(Probe p, Tactic t)
t
to a given goal if the
probe p
evaluates to true.
Remarks: If p
evaluates to false, then the new tactic behaves like the
skip
tactic.public Tactic cond(Probe p, Tactic t1, Tactic t2)
t1
to a given goal if the
probe p
evaluates to true and t2
otherwise.public Tactic repeat(Tactic t, int max)
t
until the goal
is not modified anymore or the maximum number of iterations max
is reached.public Tactic skip()
public Tactic fail()
public Tactic failIfNotDecided()
public Tactic usingParams(Tactic t, Params p)
t
using the given set of
parameters p
.public Tactic with(Tactic t, Params p)
t
using the given set of
parameters p
.
Remarks: Alias for
UsingParams
public Tactic parOr(Tactic... t)
public Tactic parAndThen(Tactic t1, Tactic t2)
t1
to a given goal and
then t2
to every subgoal produced by t1
. The subgoals are processed in parallel.public void interrupt()
public int getNumProbes()
public java.lang.String[] getProbeNames()
public java.lang.String getProbeDescription(java.lang.String name)
public Probe mkProbe(java.lang.String name)
public Probe constProbe(double val)
val
.public Probe lt(Probe p1, Probe p2)
true
when the value returned by
p1
is less than the value returned by p2
public Probe gt(Probe p1, Probe p2)
true
when the value returned by
p1
is greater than the value returned by p2
public Probe le(Probe p1, Probe p2)
true
when the value returned by
p1
is less than or equal the value returned by
p2
public Probe ge(Probe p1, Probe p2)
true
when the value returned by
p1
is greater than or equal the value returned by
p2
public Probe eq(Probe p1, Probe p2)
true
when the value returned by
p1
is equal to the value returned by p2
public Probe and(Probe p1, Probe p2)
true
when the value p1
and p2
evaluate to true
.public Probe or(Probe p1, Probe p2)
true
when the value p1
or p2
evaluate to true
.public Probe not(Probe p)
true
when the value p
does not evaluate to true
.public Solver mkSolver()
public Solver mkSolver(Symbol logic)
public Solver mkSolver(java.lang.String logic)
mkSolver(Symbol)
public Solver mkSimpleSolver()
public Solver mkSolver(Tactic t)
Push
and Pop
,
but it will always solve each check from scratch.public Fixedpoint mkFixedpoint()
public Optimize mkOptimize()
public FPRMSort mkFPRoundingModeSort()
Z3Exception
public FPRMExpr mkFPRoundNearestTiesToEven()
Z3Exception
public FPRMNum mkFPRNE()
Z3Exception
public FPRMNum mkFPRoundNearestTiesToAway()
Z3Exception
public FPRMNum mkFPRNA()
Z3Exception
public FPRMNum mkFPRoundTowardPositive()
Z3Exception
public FPRMNum mkFPRTP()
Z3Exception
public FPRMNum mkFPRoundTowardNegative()
Z3Exception
public FPRMNum mkFPRTN()
Z3Exception
public FPRMNum mkFPRoundTowardZero()
Z3Exception
public FPRMNum mkFPRTZ()
Z3Exception
public FPSort mkFPSort(int ebits, int sbits)
ebits
- exponent bits in the FloatingPoint sort.sbits
- significand bits in the FloatingPoint sort.Z3Exception
public FPSort mkFPSortHalf()
Z3Exception
public FPSort mkFPSort16()
Z3Exception
public FPSort mkFPSortSingle()
Z3Exception
public FPSort mkFPSort32()
Z3Exception
public FPSort mkFPSortDouble()
Z3Exception
public FPSort mkFPSort64()
Z3Exception
public FPSort mkFPSortQuadruple()
Z3Exception
public FPSort mkFPSort128()
Z3Exception
public FPNum mkFPNaN(FPSort s)
s
- FloatingPoint sort.Z3Exception
public FPNum mkFPInf(FPSort s, boolean negative)
s
- FloatingPoint sort.negative
- indicates whether the result should be negative.Z3Exception
public FPNum mkFPZero(FPSort s, boolean negative)
s
- FloatingPoint sort.negative
- indicates whether the result should be negative.Z3Exception
public FPNum mkFPNumeral(float v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFPNumeral(double v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFPNumeral(int v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFPNumeral(boolean sgn, int exp, int sig, FPSort s)
sgn
- the sign.exp
- the exponent.sig
- the significand.s
- FloatingPoint sort.Z3Exception
public FPNum mkFPNumeral(boolean sgn, long exp, long sig, FPSort s)
sgn
- the sign.exp
- the exponent.sig
- the significand.s
- FloatingPoint sort.Z3Exception
public FPNum mkFP(float v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFP(double v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFP(int v, FPSort s)
v
- numeral value.s
- FloatingPoint sort.Z3Exception
public FPNum mkFP(boolean sgn, int exp, int sig, FPSort s)
sgn
- the sign.exp
- the exponent.sig
- the significand.s
- FloatingPoint sort.Z3Exception
public FPNum mkFP(boolean sgn, long exp, long sig, FPSort s)
sgn
- the sign.exp
- the exponent.sig
- the significand.s
- FloatingPoint sort.Z3Exception
public FPExpr mkFPAbs(Expr<FPSort> t)
t
- floating-point termZ3Exception
public FPExpr mkFPNeg(Expr<FPSort> t)
t
- floating-point termZ3Exception
public FPExpr mkFPAdd(Expr<FPRMSort> rm, Expr<FPSort> t1, Expr<FPSort> t2)
rm
- rounding mode termt1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPSub(Expr<FPRMSort> rm, Expr<FPSort> t1, Expr<FPSort> t2)
rm
- rounding mode termt1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPMul(Expr<FPRMSort> rm, Expr<FPSort> t1, Expr<FPSort> t2)
rm
- rounding mode termt1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPDiv(Expr<FPRMSort> rm, Expr<FPSort> t1, Expr<FPSort> t2)
rm
- rounding mode termt1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPFMA(Expr<FPRMSort> rm, Expr<FPSort> t1, Expr<FPSort> t2, Expr<FPSort> t3)
rm
- rounding mode termt1
- floating-point termt2
- floating-point termt3
- floating-point term
Remarks:
The result is round((t1 * t2) + t3)Z3Exception
public FPExpr mkFPSqrt(Expr<FPRMSort> rm, Expr<FPSort> t)
rm
- rounding mode termt
- floating-point termZ3Exception
public FPExpr mkFPRem(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPRoundToIntegral(Expr<FPRMSort> rm, Expr<FPSort> t)
rm
- term of RoundingMode sortt
- floating-point termZ3Exception
public FPExpr mkFPMin(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public FPExpr mkFPMax(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public BoolExpr mkFPLEq(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public BoolExpr mkFPLt(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public BoolExpr mkFPGEq(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public BoolExpr mkFPGt(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point termZ3Exception
public BoolExpr mkFPEq(Expr<FPSort> t1, Expr<FPSort> t2)
t1
- floating-point termt2
- floating-point term
Remarks:
Note that this is IEEE 754 equality (as opposed to standard =).Z3Exception
public BoolExpr mkFPIsNormal(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsSubnormal(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsZero(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsInfinite(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsNaN(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsNegative(Expr<FPSort> t)
t
- floating-point termZ3Exception
public BoolExpr mkFPIsPositive(Expr<FPSort> t)
t
- floating-point termZ3Exception
public FPExpr mkFP(Expr<BitVecSort> sgn, Expr<BitVecSort> sig, Expr<BitVecSort> exp)
sgn
- bit-vector term (of size 1) representing the sign.sig
- bit-vector term representing the significand.exp
- bit-vector term representing the exponent.
Remarks:
This is the operator named `fp' in the SMT FP theory definition.
Note that sgn is required to be a bit-vector of size 1. Significand and exponent
are required to be greater than 1 and 2 respectively. The FloatingPoint sort
of the resulting expression is automatically determined from the bit-vector sizes
of the arguments.Z3Exception
public FPExpr mkFPToFP(Expr<BitVecSort> bv, FPSort s)
bv
- bit-vector value (of size m).s
- FloatingPoint sort (ebits+sbits == m)
Remarks:
Produces a term that represents the conversion of a bit-vector term bv to a
floating-point term of sort s. The bit-vector size of bv (m) must be equal
to ebits+sbits of s. The format of the bit-vector is as defined by the
IEEE 754-2008 interchange format.Z3Exception
public FPExpr mkFPToFP(Expr<FPRMSort> rm, FPExpr t, FPSort s)
rm
- RoundingMode term.t
- FloatingPoint term.s
- FloatingPoint sort.
Remarks:
Produces a term that represents the conversion of a floating-point term t to a
floating-point term of sort s. If necessary, the result will be rounded according
to rounding mode rm.Z3Exception
public FPExpr mkFPToFP(Expr<FPRMSort> rm, RealExpr t, FPSort s)
rm
- RoundingMode term.t
- term of Real sort.s
- FloatingPoint sort.
Remarks:
Produces a term that represents the conversion of term t of real sort into a
floating-point term of sort s. If necessary, the result will be rounded according
to rounding mode rm.Z3Exception
public FPExpr mkFPToFP(Expr<FPRMSort> rm, Expr<BitVecSort> t, FPSort s, boolean signed)
rm
- RoundingMode term.t
- term of bit-vector sort.s
- FloatingPoint sort.signed
- flag indicating whether t is interpreted as signed or unsigned bit-vector.
Remarks:
Produces a term that represents the conversion of the bit-vector term t into a
floating-point term of sort s. The bit-vector t is taken to be in signed
2's complement format (when signed==true, otherwise unsigned). If necessary, the
result will be rounded according to rounding mode rm.Z3Exception
public FPExpr mkFPToFP(FPSort s, Expr<FPRMSort> rm, Expr<FPSort> t)
s
- FloatingPoint sortrm
- floating-point rounding mode termt
- floating-point term
Remarks:
Produces a term that represents the conversion of a floating-point term t to a different
FloatingPoint sort s. If necessary, rounding according to rm is applied.Z3Exception
public BitVecExpr mkFPToBV(Expr<FPRMSort> rm, Expr<FPSort> t, int sz, boolean signed)
rm
- RoundingMode term.t
- FloatingPoint termsz
- Size of the resulting bit-vector.signed
- Indicates whether the result is a signed or unsigned bit-vector.
Remarks:
Produces a term that represents the conversion of the floating-point term t into a
bit-vector term of size sz in 2's complement format (signed when signed==true). If necessary,
the result will be rounded according to rounding mode rm.Z3Exception
public RealExpr mkFPToReal(Expr<FPSort> t)
t
- FloatingPoint term
Remarks:
Produces a term that represents the conversion of the floating-point term t into a
real number. Note that this type of conversion will often result in non-linear
constraints over real terms.Z3Exception
public BitVecExpr mkFPToIEEEBV(Expr<FPSort> t)
t
- FloatingPoint term.
Remarks:
The size of the resulting bit-vector is automatically determined. Note that
IEEE 754-2008 allows multiple different representations of NaN. This conversion
knows only one NaN and it will always produce the same bit-vector representation of
that NaN.Z3Exception
public BitVecExpr mkFPToFP(Expr<FPRMSort> rm, Expr<IntSort> exp, Expr<RealSort> sig, FPSort s)
rm
- RoundingMode term.exp
- Exponent term of Int sort.sig
- Significand term of Real sort.s
- FloatingPoint sort.
Remarks:
Produces a term that represents the conversion of sig * 2^exp into a
floating-point term of sort s. If necessary, the result will be rounded
according to rounding mode rm.Z3Exception
public <R extends Sort> FuncDecl<BoolSort> mkLinearOrder(R sort, int index)
index
- The index of the order.sort
- The sort of the order.public <R extends Sort> FuncDecl<BoolSort> mkPartialOrder(R sort, int index)
index
- The index of the order.sort
- The sort of the order.public AST wrapAST(long nativeObject)
nativeObject
must be a native object obtained from Z3 (e.g., through
UnwrapAST
) and that it must have a correct reference count.nativeObject
- The native pointer to wrap.Native.incRef(long, long)
,
unwrapAST(com.microsoft.z3.AST)
public long unwrapAST(AST a)
a
- The AST to unwrap.Native.incRef(long, long)
,
wrapAST(long)
public java.lang.String SimplifyHelp()
Expr.Simplify
.public ParamDescrs getSimplifyParameterDescriptions()
public void updateParamValue(java.lang.String id, java.lang.String value)
z3.exe -ini?
Only a few configuration parameters are mutable
once the context is created. An exception is thrown when trying to modify
an immutable parameter.public long nCtx()
public IDecRefQueue<Constructor<?>> getConstructorDRQ()
public IDecRefQueue<ConstructorList<?>> getConstructorListDRQ()
public IDecRefQueue<AST> getASTDRQ()
public IDecRefQueue<com.microsoft.z3.ASTMap> getASTMapDRQ()
public IDecRefQueue<ASTVector> getASTVectorDRQ()
public IDecRefQueue<ApplyResult> getApplyResultDRQ()
public IDecRefQueue<FuncInterp.Entry<?>> getFuncEntryDRQ()
public IDecRefQueue<FuncInterp<?>> getFuncInterpDRQ()
public IDecRefQueue<Goal> getGoalDRQ()
public IDecRefQueue<Model> getModelDRQ()
public IDecRefQueue<Params> getParamsDRQ()
public IDecRefQueue<ParamDescrs> getParamDescrsDRQ()
public IDecRefQueue<Probe> getProbeDRQ()
public IDecRefQueue<Solver> getSolverDRQ()
public IDecRefQueue<Statistics> getStatisticsDRQ()
public IDecRefQueue<Tactic> getTacticDRQ()
public IDecRefQueue<Fixedpoint> getFixedpointDRQ()
public IDecRefQueue<Optimize> getOptimizeDRQ()
public void close()
close
in interface java.lang.AutoCloseable