public class Context extends IDisposable
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Object |
creation_lock |
protected long |
m_ctx |
protected java.util.concurrent.atomic.AtomicInteger |
m_refCount |
| Constructor and Description |
|---|
Context()
Constructor.
|
Context(java.util.Map<java.lang.String,java.lang.String> settings)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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 <paramref name="t1. |
java.lang.String |
benchmarkToSMTString(java.lang.String name,
java.lang.String logic,
java.lang.String status,
java.lang.String attributes,
BoolExpr[] assumptions,
BoolExpr formula)
Convert a benchmark into an SMT-LIB formatted string.
|
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 <paramref name="t2
otherwise. |
Probe |
constProbe(double val)
Create a probe that always evaluates to
val. |
void |
dispose()
Disposes of the context.
|
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 triviall satisfiable (i.e.,
empty) or trivially unsatisfiable (i.e., contains `false').
|
protected void |
finalize()
Finalizer.
|
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 |
getApplyResultDRQ() |
IDecRefQueue |
getASTDRQ() |
IDecRefQueue |
getASTMapDRQ() |
IDecRefQueue |
getASTVectorDRQ() |
BoolSort |
getBoolSort()
Retrieves the Boolean sort of the context.
|
IDecRefQueue |
getFixedpointDRQ() |
IDecRefQueue |
getFuncEntryDRQ() |
IDecRefQueue |
getFuncInterpDRQ() |
IDecRefQueue |
getGoalDRQ() |
IntSort |
getIntSort()
Retrieves the Integer sort of the context.
|
IDecRefQueue |
getModelDRQ() |
int |
getNumProbes()
The number of supported Probes.
|
int |
getNumSMTLIBAssumptions()
The number of SMTLIB assumptions parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
int |
getNumSMTLIBDecls()
The number of SMTLIB declarations parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
int |
getNumSMTLIBFormulas()
The number of SMTLIB formulas parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
int |
getNumSMTLIBSorts()
The number of SMTLIB sorts parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
int |
getNumTactics()
The number of supported tactics.
|
IDecRefQueue |
getOptimizeDRQ() |
IDecRefQueue |
getParamDescrsDRQ() |
IDecRefQueue |
getParamsDRQ() |
java.lang.String |
getProbeDescription(java.lang.String name)
Returns a string containing a description of the probe with the given
name.
|
IDecRefQueue |
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.
|
BoolExpr[] |
getSMTLIBAssumptions()
The assumptions parsed by the last call to
ParseSMTLIBString
or ParseSMTLIBFile. |
FuncDecl[] |
getSMTLIBDecls()
The declarations parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
BoolExpr[] |
getSMTLIBFormulas()
The formulas parsed by the last call to
ParseSMTLIBString or
ParseSMTLIBFile. |
Sort[] |
getSMTLIBSorts()
The declarations parsed by the last call to
ParseSMTLIBString or ParseSMTLIBFile. |
IDecRefQueue |
getSolverDRQ() |
IDecRefQueue |
getStatisticsDRQ() |
SeqSort |
getStringSort()
Retrieves the Integer 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 |
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.
|
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 |
ArithExpr |
mkAdd(ArithExpr... t)
Create an expression representing
t[0] + t[1] + .... |
BoolExpr |
mkAnd(BoolExpr... t)
Create an expression representing
t[0] and t[1] and .... |
Expr |
mkApp(FuncDecl f,
Expr... args)
Create a new function application.
|
ArrayExpr |
mkArrayConst(java.lang.String name,
Sort domain,
Sort range)
Create an array constant.
|
ArrayExpr |
mkArrayConst(Symbol name,
Sort domain,
Sort range)
Create an array constant.
|
Expr |
mkArrayExt(ArrayExpr arg1,
ArrayExpr arg2)
Create Extentionality index.
|
ArraySort |
mkArraySort(Sort domain,
Sort range)
Create a new array sort.
|
SeqExpr |
MkAt(SeqExpr s,
IntExpr index)
Retrieve sequence of length one at index.
|
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.
|
Expr |
mkBound(int index,
Sort 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(BitVecExpr t,
boolean signed)
Create an integer from the bit-vector argument
t. |
BitVecExpr |
mkBVAdd(BitVecExpr t1,
BitVecExpr t2)
Two's complement addition.
|
BoolExpr |
mkBVAddNoOverflow(BitVecExpr t1,
BitVecExpr t2,
boolean isSigned)
Create a predicate that checks that the bit-wise addition does not
overflow.
|
BoolExpr |
mkBVAddNoUnderflow(BitVecExpr t1,
BitVecExpr t2)
Create a predicate that checks that the bit-wise addition does not
underflow.
|
BitVecExpr |
mkBVAND(BitVecExpr t1,
BitVecExpr t2)
Bitwise conjunction.
|
BitVecExpr |
mkBVASHR(BitVecExpr t1,
BitVecExpr 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(BitVecExpr t1,
BitVecExpr t2)
Logical shift right
Remarks: It is equivalent to unsigned division by
2^x where \c x is the value of t2. |
BitVecExpr |
mkBVMul(BitVecExpr t1,
BitVecExpr t2)
Two's complement multiplication.
|
BoolExpr |
mkBVMulNoOverflow(BitVecExpr t1,
BitVecExpr t2,
boolean isSigned)
Create a predicate that checks that the bit-wise multiplication does not
overflow.
|
BoolExpr |
mkBVMulNoUnderflow(BitVecExpr t1,
BitVecExpr t2)
Create a predicate that checks that the bit-wise multiplication does not
underflow.
|
BitVecExpr |
mkBVNAND(BitVecExpr t1,
BitVecExpr t2)
Bitwise NAND.
|
BitVecExpr |
mkBVNeg(BitVecExpr t)
Standard two's complement unary minus.
|
BoolExpr |
mkBVNegNoOverflow(BitVecExpr t)
Create a predicate that checks that the bit-wise negation does not
overflow.
|
BitVecExpr |
mkBVNOR(BitVecExpr t1,
BitVecExpr t2)
Bitwise NOR.
|
BitVecExpr |
mkBVNot(BitVecExpr t)
Bitwise negation.
|
BitVecExpr |
mkBVOR(BitVecExpr t1,
BitVecExpr t2)
Bitwise disjunction.
|
BitVecExpr |
mkBVRedAND(BitVecExpr t)
Take conjunction of bits in a vector, return vector of length 1.
|
BitVecExpr |
mkBVRedOR(BitVecExpr t)
Take disjunction of bits in a vector, return vector of length 1.
|
BitVecExpr |
mkBVRotateLeft(BitVecExpr t1,
BitVecExpr t2)
Rotate Left.
|
BitVecExpr |
mkBVRotateLeft(int i,
BitVecExpr t)
Rotate Left.
|
BitVecExpr |
mkBVRotateRight(BitVecExpr t1,
BitVecExpr t2)
Rotate Right.
|
BitVecExpr |
mkBVRotateRight(int i,
BitVecExpr t)
Rotate Right.
|
BitVecExpr |
mkBVSDiv(BitVecExpr t1,
BitVecExpr t2)
Signed division.
|
BoolExpr |
mkBVSDivNoOverflow(BitVecExpr t1,
BitVecExpr t2)
Create a predicate that checks that the bit-wise signed division does not
overflow.
|
BoolExpr |
mkBVSGE(BitVecExpr t1,
BitVecExpr t2)
Two's complement signed greater than or equal to.
|
BoolExpr |
mkBVSGT(BitVecExpr t1,
BitVecExpr t2)
Two's complement signed greater-than.
|
BitVecExpr |
mkBVSHL(BitVecExpr t1,
BitVecExpr t2)
Shift left.
|
BoolExpr |
mkBVSLE(BitVecExpr t1,
BitVecExpr t2)
Two's complement signed less-than or equal to.
|
BoolExpr |
mkBVSLT(BitVecExpr t1,
BitVecExpr t2)
Two's complement signed less-than
Remarks: The arguments must have the
same bit-vector sort.
|
BitVecExpr |
mkBVSMod(BitVecExpr t1,
BitVecExpr t2)
Two's complement signed remainder (sign follows divisor).
|
BitVecExpr |
mkBVSRem(BitVecExpr t1,
BitVecExpr t2)
Signed remainder.
|
BitVecExpr |
mkBVSub(BitVecExpr t1,
BitVecExpr t2)
Two's complement subtraction.
|
BoolExpr |
mkBVSubNoOverflow(BitVecExpr t1,
BitVecExpr t2)
Create a predicate that checks that the bit-wise subtraction does not
overflow.
|
BoolExpr |
mkBVSubNoUnderflow(BitVecExpr t1,
BitVecExpr t2,
boolean isSigned)
Create a predicate that checks that the bit-wise subtraction does not
underflow.
|
BitVecExpr |
mkBVUDiv(BitVecExpr t1,
BitVecExpr t2)
Unsigned division.
|
BoolExpr |
mkBVUGE(BitVecExpr t1,
BitVecExpr t2)
Unsigned greater than or equal to.
|
BoolExpr |
mkBVUGT(BitVecExpr t1,
BitVecExpr t2)
Unsigned greater-than.
|
BoolExpr |
mkBVULE(BitVecExpr t1,
BitVecExpr t2)
Unsigned less-than or equal to.
|
BoolExpr |
mkBVULT(BitVecExpr t1,
BitVecExpr t2)
Unsigned less-than
Remarks: The arguments must have the same bit-vector
sort.
|
BitVecExpr |
mkBVURem(BitVecExpr t1,
BitVecExpr t2)
Unsigned remainder.
|
BitVecExpr |
mkBVXNOR(BitVecExpr t1,
BitVecExpr t2)
Bitwise XNOR.
|
BitVecExpr |
mkBVXOR(BitVecExpr t1,
BitVecExpr t2)
Bitwise XOR.
|
BitVecExpr |
mkConcat(BitVecExpr t1,
BitVecExpr t2)
Bit-vector concatenation.
|
ReExpr |
MkConcat(ReExpr... t)
Create the concatenation of regular languages.
|
SeqExpr |
MkConcat(SeqExpr... t)
Concatentate sequences.
|
Expr |
mkConst(FuncDecl f)
Creates a fresh constant from the FuncDecl
f. |
Expr |
mkConst(java.lang.String name,
Sort range)
Creates a new Constant of sort
range and named
name. |
Expr |
mkConst(Symbol name,
Sort range)
Creates a new Constant of sort
range and named
name. |
ArrayExpr |
mkConstArray(Sort domain,
Expr v)
Create a constant array.
|
FuncDecl |
mkConstDecl(java.lang.String name,
Sort range)
Creates a new constant function declaration.
|
FuncDecl |
mkConstDecl(Symbol name,
Sort range)
Creates a new constant function declaration.
|
Constructor |
mkConstructor(java.lang.String name,
java.lang.String recognizer,
java.lang.String[] fieldNames,
Sort[] sorts,
int[] sortRefs)
Create a datatype constructor.
|
Constructor |
mkConstructor(Symbol name,
Symbol recognizer,
Symbol[] fieldNames,
Sort[] sorts,
int[] sortRefs)
Create a datatype constructor.
|
BoolExpr |
MkContains(SeqExpr s1,
SeqExpr s2)
Check for sequence containment of s2 in s1.
|
DatatypeSort |
mkDatatypeSort(java.lang.String name,
Constructor[] constructors)
Create a new datatype sort.
|
DatatypeSort |
mkDatatypeSort(Symbol name,
Constructor[] constructors)
Create a new datatype sort.
|
DatatypeSort[] |
mkDatatypeSorts(java.lang.String[] names,
Constructor[][] c)
Create mutually recursive data-types.
|
DatatypeSort[] |
mkDatatypeSorts(Symbol[] names,
Constructor[][] c)
Create mutually recursive datatypes.
|
BoolExpr |
mkDistinct(Expr... args)
Creates a
distinct term. |
ArithExpr |
mkDiv(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 / t2. |
SeqExpr |
MkEmptySeq(Sort s)
Create the empty sequence.
|
ArrayExpr |
mkEmptySet(Sort domain)
Create an empty set.
|
EnumSort |
mkEnumSort(java.lang.String name,
java.lang.String... enumNames)
Create a new enumeration sort.
|
EnumSort |
mkEnumSort(Symbol name,
Symbol... enumNames)
Create a new enumeration sort.
|
BoolExpr |
mkEq(Expr x,
Expr y)
Creates the equality
x"/> = <paramref name="y. |
Quantifier |
mkExists(Expr[] boundConstants,
Expr 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 body,
int weight,
Pattern[] patterns,
Expr[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Creates an existential quantifier using de-Brujin indexed variables.
|
BitVecExpr |
mkExtract(int high,
int low,
BitVecExpr t)
Bit-vector extraction.
|
SeqExpr |
MkExtract(SeqExpr s,
IntExpr offset,
IntExpr length)
Extract subsequence.
|
BoolExpr |
mkFalse()
The false Term.
|
FiniteDomainSort |
mkFiniteDomainSort(java.lang.String name,
long size)
Create a new finite domain sort.
|
FiniteDomainSort |
mkFiniteDomainSort(Symbol name,
long size)
Create a new finite domain sort.
|
Fixedpoint |
mkFixedpoint()
Create a Fixedpoint context.
|
Quantifier |
mkForall(Expr[] boundConstants,
Expr 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 body,
int weight,
Pattern[] patterns,
Expr[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a universal Quantifier.
|
FPExpr |
mkFP(BitVecExpr sgn,
BitVecExpr sig,
BitVecExpr exp)
Create an expression of FloatingPoint sort from three bit-vector expressions.
|
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 float.
|
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(FPExpr t)
Floating-point absolute value
|
FPExpr |
mkFPAdd(FPRMExpr rm,
FPExpr t1,
FPExpr t2)
Floating-point addition
|
FPExpr |
mkFPDiv(FPRMExpr rm,
FPExpr t1,
FPExpr t2)
Floating-point division
|
BoolExpr |
mkFPEq(FPExpr t1,
FPExpr t2)
Floating-point equality.
|
FPExpr |
mkFPFMA(FPRMExpr rm,
FPExpr t1,
FPExpr t2,
FPExpr t3)
Floating-point fused multiply-add
|
BoolExpr |
mkFPGEq(FPExpr t1,
FPExpr t2)
Floating-point greater than or equal.
|
BoolExpr |
mkFPGt(FPExpr t1,
FPExpr t2)
Floating-point greater than.
|
FPNum |
mkFPInf(FPSort s,
boolean negative)
Create a floating-point infinity of sort s.
|
BoolExpr |
mkFPIsInfinite(FPExpr t)
Predicate indicating whether t is a floating-point number representing +oo or -oo.
|
BoolExpr |
mkFPIsNaN(FPExpr t)
Predicate indicating whether t is a NaN.
|
BoolExpr |
mkFPIsNegative(FPExpr t)
Predicate indicating whether t is a negative floating-point number.
|
BoolExpr |
mkFPIsNormal(FPExpr t)
Predicate indicating whether t is a normal floating-point number.\
|
BoolExpr |
mkFPIsPositive(FPExpr t)
Predicate indicating whether t is a positive floating-point number.
|
BoolExpr |
mkFPIsSubnormal(FPExpr t)
Predicate indicating whether t is a subnormal floating-point number.\
|
BoolExpr |
mkFPIsZero(FPExpr t)
Predicate indicating whether t is a floating-point number with zero value, i.e., +0 or -0.
|
BoolExpr |
mkFPLEq(FPExpr t1,
FPExpr t2)
Floating-point less than or equal.
|
BoolExpr |
mkFPLt(FPExpr t1,
FPExpr t2)
Floating-point less than.
|
FPExpr |
mkFPMax(FPExpr t1,
FPExpr t2)
Maximum of floating-point numbers.
|
FPExpr |
mkFPMin(FPExpr t1,
FPExpr t2)
Minimum of floating-point numbers.
|
FPExpr |
mkFPMul(FPRMExpr rm,
FPExpr t1,
FPExpr t2)
Floating-point multiplication
|
FPNum |
mkFPNaN(FPSort s)
Create a NaN of sort s.
|
FPExpr |
mkFPNeg(FPExpr 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 float.
|
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(FPExpr t1,
FPExpr 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(FPRMExpr rm,
FPExpr 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(FPRMExpr rm,
FPExpr t)
Floating-point square root
|
FPExpr |
mkFPSub(FPRMExpr rm,
FPExpr t1,
FPExpr t2)
Floating-point subtraction
|
BitVecExpr |
mkFPToBV(FPRMExpr rm,
FPExpr t,
int sz,
boolean signed)
Conversion of a floating-point term into a bit-vector.
|
FPExpr |
mkFPToFP(BitVecExpr bv,
FPSort s)
Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.
|
FPExpr |
mkFPToFP(FPRMExpr rm,
BitVecExpr t,
FPSort s,
boolean signed)
Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.
|
FPExpr |
mkFPToFP(FPRMExpr rm,
FPExpr t,
FPSort s)
Conversion of a FloatingPoint term into another term of different FloatingPoint sort.
|
BitVecExpr |
mkFPToFP(FPRMExpr rm,
IntExpr exp,
RealExpr sig,
FPSort s)
Conversion of a real-sorted significand and an integer-sorted exponent into a term of FloatingPoint sort.
|
FPExpr |
mkFPToFP(FPRMExpr rm,
RealExpr t,
FPSort s)
Conversion of a term of real sort into a term of FloatingPoint sort.
|
FPExpr |
mkFPToFP(FPSort s,
FPRMExpr rm,
FPExpr t)
Conversion of a floating-point number to another FloatingPoint sort s.
|
BitVecExpr |
mkFPToIEEEBV(FPExpr t)
Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
|
RealExpr |
mkFPToReal(FPExpr 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.
|
Expr |
mkFreshConst(java.lang.String prefix,
Sort range)
Creates a fresh Constant of sort
range and a name
prefixed with prefix. |
FuncDecl |
mkFreshConstDecl(java.lang.String prefix,
Sort range)
Creates a fresh constant function declaration with a name prefixed with
prefix". |
FuncDecl |
mkFreshFuncDecl(java.lang.String prefix,
Sort[] domain,
Sort range)
Creates a fresh function declaration with a name prefixed with
prefix. |
ArrayExpr |
mkFullSet(Sort domain)
Create the full set.
|
FuncDecl |
mkFuncDecl(java.lang.String name,
Sort[] domain,
Sort range)
Creates a new function declaration.
|
FuncDecl |
mkFuncDecl(java.lang.String name,
Sort domain,
Sort range)
Creates a new function declaration.
|
FuncDecl |
mkFuncDecl(Symbol name,
Sort[] domain,
Sort range)
Creates a new function declaration.
|
FuncDecl |
mkFuncDecl(Symbol name,
Sort domain,
Sort range)
Creates a new function declaration.
|
BoolExpr |
mkGe(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 >= t2 |
Goal |
mkGoal(boolean models,
boolean unsatCores,
boolean proofs)
Creates a new Goal.
|
BoolExpr |
mkGt(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 > t2 |
BoolExpr |
mkIff(BoolExpr t1,
BoolExpr t2)
Create an expression representing
t1 iff t2. |
BoolExpr |
mkImplies(BoolExpr t1,
BoolExpr t2)
Create an expression representing
t1 -> t2. |
IntExpr |
MkIndexOf(SeqExpr s,
SeqExpr substr,
ArithExpr offset)
Extract index of sub-string starting at offset.
|
BoolExpr |
MkInRe(SeqExpr s,
ReExpr 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,
IntExpr t)
Create an
n bit bit-vector from the integer argument
t. |
RealExpr |
mkInt2Real(IntExpr 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.
|
IntSort |
mkIntSort()
Create a new integer sort.
|
BoolExpr |
mkIsInteger(RealExpr t)
Creates an expression that checks whether a real number is an integer.
|
Expr |
mkITE(BoolExpr t1,
Expr t2,
Expr t3)
Create an expression representing an if-then-else:
ite(t1, t2, t3). |
BoolExpr |
mkLe(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 <= t2 |
IntExpr |
MkLength(SeqExpr s)
Retrieve the length of a given sequence.
|
ListSort |
mkListSort(java.lang.String name,
Sort elemSort)
Create a new list sort.
|
ListSort |
mkListSort(Symbol name,
Sort elemSort)
Create a new list sort.
|
BoolExpr |
mkLt(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 < t2 |
ArrayExpr |
mkMap(FuncDecl f,
ArrayExpr... args)
Maps f on the argument arrays.
|
IntExpr |
mkMod(IntExpr t1,
IntExpr t2)
Create an expression representing
t1 mod t2. |
ArithExpr |
mkMul(ArithExpr... t)
Create an expression representing
t[0] * t[1] * .... |
BoolExpr |
mkNot(BoolExpr a)
Mk an expression representing
not(a). |
Expr |
mkNumeral(int v,
Sort ty)
Create a Term of a given sort.
|
Expr |
mkNumeral(long v,
Sort ty)
Create a Term of a given sort.
|
Expr |
mkNumeral(java.lang.String v,
Sort ty)
Create a Term of a given sort.
|
Optimize |
mkOptimize()
Create a Optimize context.
|
BoolExpr |
mkOr(BoolExpr... t)
Create an expression representing
t[0] or t[1] or .... |
Params |
mkParams()
Creates a new ParameterSet.
|
Pattern |
mkPattern(Expr... terms)
Create a quantifier pattern.
|
ArithExpr |
mkPower(ArithExpr t1,
ArithExpr t2)
Create an expression representing
t1 ^ t2. |
BoolExpr |
MkPrefixOf(SeqExpr s1,
SeqExpr s2)
Check for sequence prefix.
|
Probe |
mkProbe(java.lang.String name)
Creates a new Probe.
|
Quantifier |
mkQuantifier(boolean universal,
Expr[] boundConstants,
Expr body,
int weight,
Pattern[] patterns,
Expr[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a Quantifier
|
Quantifier |
mkQuantifier(boolean universal,
Sort[] sorts,
Symbol[] names,
Expr body,
int weight,
Pattern[] patterns,
Expr[] noPatterns,
Symbol quantifierID,
Symbol skolemID)
Create a Quantifier.
|
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(RealExpr 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.
|
IntExpr |
mkRem(IntExpr t1,
IntExpr t2)
Create an expression representing
t1 rem t2. |
BitVecExpr |
mkRepeat(int i,
BitVecExpr t)
Bit-vector repetition.
|
SeqExpr |
MkReplace(SeqExpr s,
SeqExpr src,
SeqExpr dst)
Replace the first occurrence of src by dst in s.
|
ReSort |
mkReSort(Sort s)
Create a new regular expression sort
|
Expr |
mkSelect(ArrayExpr a,
Expr i)
Array read.
|
SeqSort |
mkSeqSort(Sort s)
Create a new sequence sort
|
ArrayExpr |
mkSetAdd(ArrayExpr set,
Expr element)
Add an element to the set.
|
ArrayExpr |
mkSetComplement(ArrayExpr arg)
Take the complement of a set.
|
ArrayExpr |
mkSetDel(ArrayExpr set,
Expr element)
Remove an element from a set.
|
ArrayExpr |
mkSetDifference(ArrayExpr arg1,
ArrayExpr arg2)
Take the difference between two sets.
|
ArrayExpr |
mkSetIntersection(ArrayExpr... args)
Take the intersection of a list of sets.
|
BoolExpr |
mkSetMembership(Expr elem,
ArrayExpr set)
Check for set membership.
|
SetSort |
mkSetSort(Sort ty)
Create a set type.
|
BoolExpr |
mkSetSubset(ArrayExpr arg1,
ArrayExpr arg2)
Check for subsetness of sets.
|
ArrayExpr |
mkSetUnion(ArrayExpr... args)
Take the union of a list of sets.
|
BitVecExpr |
mkSignExt(int i,
BitVecExpr 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.
|
ReExpr |
MkStar(ReExpr re)
Take the Kleene star of a regular expression.
|
ArrayExpr |
mkStore(ArrayExpr a,
Expr i,
Expr v)
Array update.
|
SeqExpr |
MkString(java.lang.String s)
Create a string constant.
|
SeqSort |
mkStringSort()
Create a new string sort
|
ArithExpr |
mkSub(ArithExpr... t)
Create an expression representing
t[0] - t[1] - .... |
BoolExpr |
MkSuffixOf(SeqExpr s1,
SeqExpr 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.
|
Expr |
mkTermArray(ArrayExpr array)
Access the array default value.
|
ReExpr |
MkToRe(SeqExpr 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.
|
ArithExpr |
mkUnaryMinus(ArithExpr 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.
|
ReExpr |
MkUnion(ReExpr... t)
Create the union of regular languages.
|
SeqExpr |
MkUnit(Expr elem)
Create the singleton sequence.
|
Expr |
MkUpdateField(FuncDecl field,
Expr t,
Expr v)
Update a datatype field at expression t with value v.
|
BoolExpr |
mkXor(BoolExpr t1,
BoolExpr t2)
Create an expression representing
t1 xor t2. |
BitVecExpr |
mkZeroExt(int i,
BitVecExpr t)
Bit-vector zero extension.
|
ReExpr |
MOption(ReExpr re)
Create the optional regular expression.
|
ReExpr |
MPlus(ReExpr re)
Take the Kleene plus of a regular expression.
|
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.
|
void |
parseSMTLIBFile(java.lang.String fileName,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl[] decls)
Parse the given file using the SMT-LIB parser.
|
void |
parseSMTLIBString(java.lang.String str,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl[] decls)
Parse the given string using the SMT-LIB 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. |
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.
|
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. |
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.
|
protected long m_ctx
protected static final java.lang.Object creation_lock
protected java.util.concurrent.atomic.AtomicInteger m_refCount
public Context()
public Context(java.util.Map<java.lang.String,java.lang.String> settings)
Global.setParameterpublic IntSymbol mkSymbol(int i)
public StringSymbol mkSymbol(java.lang.String name)
public BoolSort getBoolSort()
public IntSort getIntSort()
public RealSort getRealSort()
public BoolSort mkBoolSort()
public SeqSort getStringSort()
public UninterpretedSort mkUninterpretedSort(Symbol s)
public UninterpretedSort mkUninterpretedSort(java.lang.String str)
public IntSort mkIntSort()
public RealSort mkRealSort()
public BitVecSort mkBitVecSort(int size)
public SeqSort mkStringSort()
public TupleSort mkTupleSort(Symbol name, Symbol[] fieldNames, Sort[] fieldSorts)
public EnumSort mkEnumSort(Symbol name, Symbol... enumNames)
public EnumSort mkEnumSort(java.lang.String name, java.lang.String... enumNames)
public FiniteDomainSort mkFiniteDomainSort(Symbol name, long size)
public FiniteDomainSort mkFiniteDomainSort(java.lang.String name, long size)
public Constructor 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 Constructor mkConstructor(java.lang.String name, java.lang.String recognizer, java.lang.String[] fieldNames, Sort[] sorts, int[] sortRefs)
public DatatypeSort mkDatatypeSort(Symbol name, Constructor[] constructors)
public DatatypeSort mkDatatypeSort(java.lang.String name, Constructor[] constructors)
public DatatypeSort[] mkDatatypeSorts(Symbol[] names, Constructor[][] c)
names - names of datatype sortsc - list of constructors, one list per sort.public DatatypeSort[] mkDatatypeSorts(java.lang.String[] names, Constructor[][] c)
public Expr MkUpdateField(FuncDecl field, Expr t, Expr v) throws Z3Exception
Z3Exceptionpublic FuncDecl mkFuncDecl(Symbol name, Sort[] domain, Sort range)
public FuncDecl mkFuncDecl(Symbol name, Sort domain, Sort range)
public FuncDecl mkFuncDecl(java.lang.String name, Sort[] domain, Sort range)
public FuncDecl mkFuncDecl(java.lang.String name, Sort domain, Sort range)
public FuncDecl mkFreshFuncDecl(java.lang.String prefix, Sort[] domain, Sort range)
prefix.public FuncDecl mkConstDecl(Symbol name, Sort range)
public FuncDecl mkConstDecl(java.lang.String name, Sort range)
public FuncDecl mkFreshConstDecl(java.lang.String prefix, Sort range)
prefix".public Expr mkBound(int index, Sort ty)
index - The de-Bruijn index of the variablety - The sort of the variablepublic Expr mkConst(Symbol name, Sort range)
range and named
name.public Expr mkConst(java.lang.String name, Sort range)
range and named
name.public Expr mkFreshConst(java.lang.String prefix, Sort range)
range and a name
prefixed with prefix.public Expr mkConst(FuncDecl 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)
public BoolExpr mkTrue()
public BoolExpr mkFalse()
public BoolExpr mkBool(boolean value)
public Expr mkITE(BoolExpr t1, Expr t2, Expr t3)
ite(t1, t2, t3).t1 - An expression with Boolean sortt2 - An expressiont3 - An expression with the same sort as t2public BoolExpr mkImplies(BoolExpr t1, BoolExpr t2)
t1 -> t2.public IntExpr mkMod(IntExpr t1, IntExpr t2)
t1 mod t2.
Remarks: The
arguments must have int type.public IntExpr mkRem(IntExpr t1, IntExpr t2)
t1 rem t2.
Remarks: The
arguments must have int type.public ArithExpr mkPower(ArithExpr t1, ArithExpr t2)
t1 ^ t2.public RealExpr mkInt2Real(IntExpr t)
k and and asserting
MakeInt2Real(k) <= t1 < MkInt2Real(k)+1. The argument
must be of integer sort.public IntExpr mkReal2Int(RealExpr t)
public BoolExpr mkIsInteger(RealExpr t)
public BitVecExpr mkBVNot(BitVecExpr t)
public BitVecExpr mkBVRedAND(BitVecExpr t)
public BitVecExpr mkBVRedOR(BitVecExpr t)
public BitVecExpr mkBVAND(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVOR(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVXOR(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVNAND(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVNOR(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVXNOR(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVNeg(BitVecExpr t)
public BitVecExpr mkBVAdd(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVSub(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVMul(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVUDiv(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr t2)
t2 is zero, then the result is undefined. The arguments must
have the same bit-vector sort.public BoolExpr mkBVULT(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSLT(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVULE(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSLE(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVUGE(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSGE(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVUGT(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSGT(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkConcat(BitVecExpr t1, BitVecExpr t2)
n1+n2, where
n1 (n2) is the size of t1
(t2).public BitVecExpr mkExtract(int high, int low, BitVecExpr 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, BitVecExpr 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, BitVecExpr 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, BitVecExpr t)
t must
have a bit-vector sort.public BitVecExpr mkBVSHL(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr 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(BitVecExpr t1, BitVecExpr t2)
public BitVecExpr mkBVRotateLeft(int i, BitVecExpr t)
t must have a bit-vector sort.public BitVecExpr mkBVRotateRight(int i, BitVecExpr t)
t must have a bit-vector sort.public BitVecExpr mkBVRotateLeft(BitVecExpr t1, BitVecExpr t2)
t1 to the left
t2 times. The arguments must have the same bit-vector
sort.public BitVecExpr mkBVRotateRight(BitVecExpr t1, BitVecExpr t2)
t1 to the
rightt2 times. The arguments must have the same
bit-vector sort.public BitVecExpr mkInt2BV(int n, IntExpr 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(BitVecExpr 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(BitVecExpr t1, BitVecExpr t2, boolean isSigned)
public BoolExpr mkBVAddNoUnderflow(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSubNoOverflow(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVSubNoUnderflow(BitVecExpr t1, BitVecExpr t2, boolean isSigned)
public BoolExpr mkBVSDivNoOverflow(BitVecExpr t1, BitVecExpr t2)
public BoolExpr mkBVNegNoOverflow(BitVecExpr t)
public BoolExpr mkBVMulNoOverflow(BitVecExpr t1, BitVecExpr t2, boolean isSigned)
public BoolExpr mkBVMulNoUnderflow(BitVecExpr t1, BitVecExpr t2)
public ArrayExpr mkArrayConst(Symbol name, Sort domain, Sort range)
public ArrayExpr mkArrayConst(java.lang.String name, Sort domain, Sort range)
public Expr mkSelect(ArrayExpr a, Expr 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 ArrayExpr mkStore(ArrayExpr a, Expr i, Expr 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 ArrayExpr mkConstArray(Sort domain, Expr v)
select on an arbitrary index produces the value
v.public ArrayExpr mkMap(FuncDecl f, ArrayExpr... 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 Expr mkTermArray(ArrayExpr array)
public Expr mkArrayExt(ArrayExpr arg1, ArrayExpr arg2)
public ArrayExpr mkSetIntersection(ArrayExpr... args)
public ArrayExpr mkSetDifference(ArrayExpr arg1, ArrayExpr arg2)
public BoolExpr mkSetSubset(ArrayExpr arg1, ArrayExpr arg2)
public SeqExpr MkString(java.lang.String s)
public BoolExpr MkContains(SeqExpr s1, SeqExpr s2)
public IntExpr MkIndexOf(SeqExpr s, SeqExpr substr, ArithExpr offset)
public SeqExpr MkReplace(SeqExpr s, SeqExpr src, SeqExpr dst)
public Expr mkNumeral(java.lang.String v, Sort 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 typublic Expr mkNumeral(int v, Sort ty)
MakeNumeral since it is not necessary to parse a string.v - Value of the numeralty - Sort of the numeralv and type typublic Expr mkNumeral(long v, Sort ty)
MakeNumeral since it is not necessary to parse a string.v - Value of the numeralty - Sort of the numeralv and type typublic 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 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, com.microsoft.z3.Sort).
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 body, int weight, Pattern[] patterns, Expr[] noPatterns, Symbol quantifierID, Symbol skolemID)
public Quantifier mkExists(Sort[] sorts, Symbol[] names, Expr body, int weight, Pattern[] patterns, Expr[] noPatterns, Symbol quantifierID, Symbol skolemID)
public Quantifier mkExists(Expr[] boundConstants, Expr body, int weight, Pattern[] patterns, Expr[] noPatterns, Symbol quantifierID, Symbol skolemID)
public Quantifier mkQuantifier(boolean universal, Sort[] sorts, Symbol[] names, Expr body, int weight, Pattern[] patterns, Expr[] noPatterns, Symbol quantifierID, Symbol skolemID)
public Quantifier mkQuantifier(boolean universal, Expr[] boundConstants, Expr body, int weight, Pattern[] patterns, Expr[] noPatterns, Symbol quantifierID, Symbol skolemID)
public void setPrintMode(Z3_ast_print_mode value)
Object.toString(),
Object.toString(),
Object.toString(),
Object.toString()public java.lang.String benchmarkToSMTString(java.lang.String name,
java.lang.String logic,
java.lang.String status,
java.lang.String attributes,
BoolExpr[] assumptions,
BoolExpr 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 void parseSMTLIBString(java.lang.String str,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl[] decls)
sortNames and
declNames don't need to match the names of the sorts
and declarations in the arrays sorts and decls. This is a useful feature since we can use arbitrary names
to reference sorts and declarations.public void parseSMTLIBFile(java.lang.String fileName,
Symbol[] sortNames,
Sort[] sorts,
Symbol[] declNames,
FuncDecl[] decls)
public int getNumSMTLIBFormulas()
ParseSMTLIBString or ParseSMTLIBFile.public BoolExpr[] getSMTLIBFormulas()
ParseSMTLIBString or
ParseSMTLIBFile.public int getNumSMTLIBAssumptions()
ParseSMTLIBString or ParseSMTLIBFile.public BoolExpr[] getSMTLIBAssumptions()
ParseSMTLIBString
or ParseSMTLIBFile.public int getNumSMTLIBDecls()
ParseSMTLIBString or ParseSMTLIBFile.public FuncDecl[] getSMTLIBDecls()
ParseSMTLIBString or ParseSMTLIBFile.public int getNumSMTLIBSorts()
ParseSMTLIBString or ParseSMTLIBFile.public Sort[] getSMTLIBSorts()
ParseSMTLIBString or ParseSMTLIBFile.public BoolExpr parseSMTLIB2String(java.lang.String str, Symbol[] sortNames, Sort[] sorts, Symbol[] declNames, FuncDecl[] decls)
parseSMTLIBString(java.lang.String, com.microsoft.z3.Symbol[], com.microsoft.z3.Sort[], com.microsoft.z3.Symbol[], com.microsoft.z3.FuncDecl[])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 <paramref name="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 <paramref name="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
UsingParamspublic 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)
p1 is less than the value returned by p2public Probe gt(Probe p1, Probe p2)
p1 is greater than the value returned by p2public Probe le(Probe p1, Probe p2)
p1 is less than or equal the value returned by
p2public Probe ge(Probe p1, Probe p2)
p1 is greater than or equal the value returned by
p2public Probe eq(Probe p1, Probe p2)
p1 is equal to the value returned by p2public Probe and(Probe p1, Probe p2)
p1 and p2 evaluate to "true".public Probe or(Probe p1, Probe p2)
p1 or p2 evaluate to "true".public Probe not(Probe p)
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()
Z3Exceptionpublic FPRMExpr mkFPRoundNearestTiesToEven()
Z3Exceptionpublic FPRMNum mkFPRNE()
Z3Exceptionpublic FPRMNum mkFPRoundNearestTiesToAway()
Z3Exceptionpublic FPRMNum mkFPRNA()
Z3Exceptionpublic FPRMNum mkFPRoundTowardPositive()
Z3Exceptionpublic FPRMNum mkFPRTP()
Z3Exceptionpublic FPRMNum mkFPRoundTowardNegative()
Z3Exceptionpublic FPRMNum mkFPRTN()
Z3Exceptionpublic FPRMNum mkFPRoundTowardZero()
Z3Exceptionpublic FPRMNum mkFPRTZ()
Z3Exceptionpublic FPSort mkFPSort(int ebits, int sbits)
ebits - exponent bits in the FloatingPoint sort.sbits - significand bits in the FloatingPoint sort.Z3Exceptionpublic FPSort mkFPSortHalf()
Z3Exceptionpublic FPSort mkFPSort16()
Z3Exceptionpublic FPSort mkFPSortSingle()
Z3Exceptionpublic FPSort mkFPSort32()
Z3Exceptionpublic FPSort mkFPSortDouble()
Z3Exceptionpublic FPSort mkFPSort64()
Z3Exceptionpublic FPSort mkFPSortQuadruple()
Z3Exceptionpublic FPSort mkFPSort128()
Z3Exceptionpublic FPNum mkFPNaN(FPSort s)
s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFPInf(FPSort s, boolean negative)
s - FloatingPoint sort.negative - indicates whether the result should be negative.Z3Exceptionpublic FPNum mkFPZero(FPSort s, boolean negative)
s - FloatingPoint sort.negative - indicates whether the result should be negative.Z3Exceptionpublic FPNum mkFPNumeral(float v, FPSort s)
v - numeral value.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFPNumeral(double v, FPSort s)
v - numeral value.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFPNumeral(int v, FPSort s)
s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFPNumeral(boolean sgn, int exp, int sig, FPSort s)
sgn - the sign.sig - the significand.exp - the exponent.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFPNumeral(boolean sgn, long exp, long sig, FPSort s)
sgn - the sign.sig - the significand.exp - the exponent.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFP(float v, FPSort s)
v - numeral value.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFP(double v, FPSort s)
v - numeral value.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFP(int v, FPSort s)
v - numeral value.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFP(boolean sgn, int exp, int sig, FPSort s)
sgn - the sign.exp - the exponent.sig - the significand.s - FloatingPoint sort.Z3Exceptionpublic FPNum mkFP(boolean sgn, long exp, long sig, FPSort s)
sgn - the sign.exp - the exponent.sig - the significand.s - FloatingPoint sort.Z3Exceptionpublic FPExpr mkFPAbs(FPExpr t)
t - floating-point termZ3Exceptionpublic FPExpr mkFPNeg(FPExpr t)
t - floating-point termZ3Exceptionpublic FPExpr mkFPAdd(FPRMExpr rm, FPExpr t1, FPExpr t2)
rm - rounding mode termt1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPSub(FPRMExpr rm, FPExpr t1, FPExpr t2)
rm - rounding mode termt1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPMul(FPRMExpr rm, FPExpr t1, FPExpr t2)
rm - rounding mode termt1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPDiv(FPRMExpr rm, FPExpr t1, FPExpr t2)
rm - rounding mode termt1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPFMA(FPRMExpr rm, FPExpr t1, FPExpr t2, FPExpr t3)
rm - rounding mode termt1 - floating-point termt2 - floating-point termt3 - floating-point term
Remarks:
The result is round((t1 * t2) + t3)Z3Exceptionpublic FPExpr mkFPSqrt(FPRMExpr rm, FPExpr t)
rm - rounding mode termt - floating-point termZ3Exceptionpublic FPExpr mkFPRem(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPRoundToIntegral(FPRMExpr rm, FPExpr t)
rm - term of RoundingMode sortt - floating-point termZ3Exceptionpublic FPExpr mkFPMin(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic FPExpr mkFPMax(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic BoolExpr mkFPLEq(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic BoolExpr mkFPLt(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic BoolExpr mkFPGEq(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic BoolExpr mkFPGt(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point termZ3Exceptionpublic BoolExpr mkFPEq(FPExpr t1, FPExpr t2)
t1 - floating-point termt2 - floating-point term
Remarks:
Note that this is IEEE 754 equality (as opposed to standard =).Z3Exceptionpublic BoolExpr mkFPIsNormal(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsSubnormal(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsZero(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsInfinite(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsNaN(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsNegative(FPExpr t)
t - floating-point termZ3Exceptionpublic BoolExpr mkFPIsPositive(FPExpr t)
t - floating-point termZ3Exceptionpublic FPExpr mkFP(BitVecExpr sgn, BitVecExpr sig, BitVecExpr 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.Z3Exceptionpublic FPExpr mkFPToFP(BitVecExpr 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.Z3Exceptionpublic FPExpr mkFPToFP(FPRMExpr 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.Z3Exceptionpublic FPExpr mkFPToFP(FPRMExpr 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.Z3Exceptionpublic FPExpr mkFPToFP(FPRMExpr rm, BitVecExpr 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.Z3Exceptionpublic FPExpr mkFPToFP(FPSort s, FPRMExpr rm, FPExpr 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.Z3Exceptionpublic BitVecExpr mkFPToBV(FPRMExpr rm, FPExpr 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-poiunt 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.Z3Exceptionpublic RealExpr mkFPToReal(FPExpr t)
t - FloatingPoint term
Remarks:
Produces a term that represents the conversion of the floating-poiunt term t into a
real number. Note that this type of conversion will often result in non-linear
constraints over real terms.Z3Exceptionpublic BitVecExpr mkFPToIEEEBV(FPExpr 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 represenatation of
that NaN.Z3Exceptionpublic BitVecExpr mkFPToFP(FPRMExpr rm, IntExpr exp, RealExpr 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.Z3Exceptionpublic 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,
unwrapASTpublic long unwrapAST(AST a)
a - The AST to unwrap.Native#incRef,
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 IDecRefQueue getASTDRQ()
public IDecRefQueue getASTMapDRQ()
public IDecRefQueue getASTVectorDRQ()
public IDecRefQueue getApplyResultDRQ()
public IDecRefQueue getFuncEntryDRQ()
public IDecRefQueue getFuncInterpDRQ()
public IDecRefQueue getGoalDRQ()
public IDecRefQueue getModelDRQ()
public IDecRefQueue getParamsDRQ()
public IDecRefQueue getParamDescrsDRQ()
public IDecRefQueue getProbeDRQ()
public IDecRefQueue getSolverDRQ()
public IDecRefQueue getStatisticsDRQ()
public IDecRefQueue getTacticDRQ()
public IDecRefQueue getFixedpointDRQ()
public IDecRefQueue getOptimizeDRQ()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void dispose()
dispose in class IDisposable