Z3
 
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
Context Class Reference
+ Inheritance diagram for Context:

Public Member Functions

 Context ()
 
 Context (Map< String, String > settings)
 
IntSymbol mkSymbol (int i)
 
StringSymbol mkSymbol (String name)
 
BoolSort getBoolSort ()
 
IntSort getIntSort ()
 
RealSort getRealSort ()
 
ComplexSort getComplexSort ()
 
ComplexSort mkComplexSort ()
 
BoolSort mkBoolSort ()
 
CharSort mkCharSort ()
 
SeqSort< CharSort > getStringSort ()
 
UninterpretedSort mkUninterpretedSort (Symbol s)
 
UninterpretedSort mkUninterpretedSort (String str)
 
IntSort mkIntSort ()
 
RealSort mkRealSort ()
 
BitVecSort mkBitVecSort (int size)
 
final< D extends Sort, R extends Sort > ArraySort< D, R > mkArraySort (D domain, R range)
 
final< R extends Sort > ArraySort< Sort, R > mkArraySort (Sort[] domains, R range)
 
SeqSort< CharSort > mkStringSort ()
 
final< R extends Sort > SeqSort< R > mkSeqSort (R s)
 
final< R extends Sort > ReSort< R > mkReSort (R s)
 
TupleSort mkTupleSort (Symbol name, Symbol[] fieldNames, Sort[] fieldSorts)
 
final< R > EnumSort< R > mkEnumSort (Symbol name, Symbol... enumNames)
 
final< R > EnumSort< R > mkEnumSort (String name, String... enumNames)
 
final< R extends Sort > ListSort< R > mkListSort (Symbol name, R elemSort)
 
final< R extends Sort > ListSort< R > mkListSort (String name, R elemSort)
 
final< R > FiniteDomainSort< R > mkFiniteDomainSort (Symbol name, long size)
 
final< R > FiniteDomainSort< R > mkFiniteDomainSort (String name, long size)
 
final< R > Constructor< R > mkConstructor (Symbol name, Symbol recognizer, Symbol[] fieldNames, Sort[] sorts, int[] sortRefs)
 
final< R > Constructor< R > mkConstructor (String name, String recognizer, String[] fieldNames, Sort[] sorts, int[] sortRefs)
 
final< R > DatatypeSort< R > mkDatatypeSort (Symbol name, Constructor< R >[] constructors)
 
final< R > DatatypeSort< R > mkDatatypeSort (String name, Constructor< R >[] constructors)
 
DatatypeSort< Object >[] mkDatatypeSorts (Symbol[] names, Constructor< Object >[][] c)
 
DatatypeSort< Object >[] mkDatatypeSorts (String[] names, Constructor< Object >[][] c)
 
TypeVarSort mkTypeVariable (Symbol name)
 
TypeVarSort mkTypeVariable (String name)
 
final< F extends Sort, R extends Sort > Expr< R > mkUpdateField (FuncDecl< F > field, Expr< R > t, Expr< F > v) throws Z3Exception
 
final< R extends Sort > FuncDecl< R > mkFuncDecl (Symbol name, Sort[] domain, R range)
 
final< R extends Sort > FuncDecl< R > mkPropagateFunction (Symbol name, Sort[] domain, R range)
 
final< R extends Sort > FuncDecl< R > mkFuncDecl (Symbol name, Sort domain, R range)
 
final< R extends Sort > FuncDecl< R > mkFuncDecl (String name, Sort[] domain, R range)
 
final< R extends Sort > FuncDecl< R > mkFuncDecl (String name, Sort domain, R range)
 
final< R extends Sort > FuncDecl< R > mkRecFuncDecl (Symbol name, Sort[] domain, R range)
 
final< R extends Sort > void AddRecDef (FuncDecl< R > f, Expr<?>[] args, Expr< R > body)
 
final< R extends Sort > FuncDecl< R > mkFreshFuncDecl (String prefix, Sort[] domain, R range)
 
final< R extends Sort > FuncDecl< R > mkConstDecl (Symbol name, R range)
 
final< R extends Sort > FuncDecl< R > mkConstDecl (String name, R range)
 
final< R extends Sort > FuncDecl< R > mkFreshConstDecl (String prefix, R range)
 
final< R extends Sort > Expr< R > mkBound (int index, R ty)
 
final Pattern mkPattern (Expr<?>... terms)
 
final< R extends Sort > Expr< R > mkConst (Symbol name, R range)
 
final< R extends Sort > Expr< R > mkConst (String name, R range)
 
final< R extends Sort > Expr< R > mkFreshConst (String prefix, R range)
 
final< R extends Sort > Expr< R > mkConst (FuncDecl< R > f)
 
BoolExpr mkBoolConst (Symbol name)
 
BoolExpr mkBoolConst (String name)
 
IntExpr mkIntConst (Symbol name)
 
IntExpr mkIntConst (String name)
 
RealExpr mkRealConst (Symbol name)
 
RealExpr mkRealConst (String name)
 
ComplexExpr mkComplexConst (Symbol name)
 
ComplexExpr mkComplexConst (String name)
 
ComplexExpr mkComplex (Expr<? extends ArithSort > real, Expr<? extends ArithSort > imag)
 
RealExpr mkRealPart (Expr< ComplexSort > value)
 
RealExpr mkImagPart (Expr< ComplexSort > value)
 
BitVecExpr mkBVConst (Symbol name, int size)
 
BitVecExpr mkBVConst (String name, int size)
 
final< R extends Sort > Expr< R > mkApp (FuncDecl< R > f, Expr<?>... args)
 
BoolExpr mkTrue ()
 
BoolExpr mkFalse ()
 
BoolExpr mkBool (boolean value)
 
BoolExpr mkEq (Expr<?> x, Expr<?> y)
 
final BoolExpr mkDistinct (Expr<?>... args)
 
final BoolExpr mkNot (Expr< BoolSort > a)
 
final< R extends Sort > Expr< R > mkITE (Expr< BoolSort > t1, Expr<? extends R > t2, Expr<? extends R > t3)
 
BoolExpr mkIff (Expr< BoolSort > t1, Expr< BoolSort > t2)
 
BoolExpr mkImplies (Expr< BoolSort > t1, Expr< BoolSort > t2)
 
BoolExpr mkXor (Expr< BoolSort > t1, Expr< BoolSort > t2)
 
final BoolExpr mkAnd (Expr< BoolSort >... t)
 
final BoolExpr mkOr (Expr< BoolSort >... t)
 
final< R extends ArithSort > ArithExpr< R > mkAdd (Expr<? extends R >... t)
 
final< R extends ArithSort > ArithExpr< R > mkMul (Expr<? extends R >... t)
 
final< R extends ArithSort > ArithExpr< R > mkSub (Expr<? extends R >... t)
 
final< R extends ArithSort > ArithExpr< R > mkUnaryMinus (Expr< R > t)
 
final< R extends ArithSort > ArithExpr< R > mkDiv (Expr<? extends R > t1, Expr<? extends R > t2)
 
IntExpr mkMod (Expr< IntSort > t1, Expr< IntSort > t2)
 
IntExpr mkRem (Expr< IntSort > t1, Expr< IntSort > t2)
 
final< R extends ArithSort > ArithExpr< R > mkPower (Expr<? extends R > t1, Expr<? extends R > t2)
 
BoolExpr mkLt (Expr<? extends ArithSort > t1, Expr<? extends ArithSort > t2)
 
BoolExpr mkLe (Expr<? extends ArithSort > t1, Expr<? extends ArithSort > t2)
 
BoolExpr mkGt (Expr<? extends ArithSort > t1, Expr<? extends ArithSort > t2)
 
BoolExpr mkGe (Expr<? extends ArithSort > t1, Expr<? extends ArithSort > t2)
 
RealExpr mkInt2Real (Expr< IntSort > t)
 
IntExpr mkReal2Int (Expr< RealSort > t)
 
BoolExpr mkIsInteger (Expr< RealSort > t)
 
BoolExpr mkDivides (Expr< IntSort > t1, Expr< IntSort > t2)
 
BitVecExpr mkBVNot (Expr< BitVecSort > t)
 
BitVecExpr mkBVRedAND (Expr< BitVecSort > t)
 
BitVecExpr mkBVRedOR (Expr< BitVecSort > t)
 
BitVecExpr mkBVAND (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVOR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVXOR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVNAND (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVNOR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVXNOR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVNeg (Expr< BitVecSort > t)
 
BitVecExpr mkBVAdd (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVSub (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVMul (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVUDiv (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVSDiv (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVURem (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVSRem (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVSMod (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVULT (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSLT (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVULE (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSLE (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVUGE (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSGE (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVUGT (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSGT (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkConcat (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkExtract (int high, int low, Expr< BitVecSort > t)
 
BitVecExpr mkSignExt (int i, Expr< BitVecSort > t)
 
BitVecExpr mkZeroExt (int i, Expr< BitVecSort > t)
 
BitVecExpr mkRepeat (int i, Expr< BitVecSort > t)
 
BitVecExpr mkBVSHL (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVLSHR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVASHR (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVRotateLeft (int i, Expr< BitVecSort > t)
 
BitVecExpr mkBVRotateRight (int i, Expr< BitVecSort > t)
 
BitVecExpr mkBVRotateLeft (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkBVRotateRight (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BitVecExpr mkInt2BV (int n, Expr< IntSort > t)
 
IntExpr mkBV2Int (Expr< BitVecSort > t, boolean signed)
 
BoolExpr mkBVAddNoOverflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2, boolean isSigned)
 
BoolExpr mkBVAddNoUnderflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSubNoOverflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVSubNoUnderflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2, boolean isSigned)
 
BoolExpr mkBVSDivNoOverflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
BoolExpr mkBVNegNoOverflow (Expr< BitVecSort > t)
 
BoolExpr mkBVMulNoOverflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2, boolean isSigned)
 
BoolExpr mkBVMulNoUnderflow (Expr< BitVecSort > t1, Expr< BitVecSort > t2)
 
final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkArrayConst (Symbol name, D domain, R range)
 
final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkArrayConst (String name, D domain, R range)
 
final< D extends Sort, R extends Sort > Expr< R > mkSelect (Expr< ArraySort< D, R > > a, Expr< D > i)
 
final< R extends Sort > Expr< R > mkSelect (Expr< ArraySort< Sort, R > > a, Expr<?>[] args)
 
final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkStore (Expr< ArraySort< D, R > > a, Expr< D > i, Expr< R > v)
 
final< R extends Sort > ArrayExpr< Sort, R > mkStore (Expr< ArraySort< Sort, R > > a, Expr<?>[] args, Expr< R > v)
 
final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkConstArray (D domain, Expr< R > v)
 
final< D extends Sort, R1 extends Sort, R2 extends Sort > ArrayExpr< D, R2 > mkMap (FuncDecl< R2 > f, Expr< ArraySort< D, R1 > >... args)
 
final< D extends Sort, R extends Sort > Expr< R > mkTermArray (Expr< ArraySort< D, R > > array)
 
final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkAsArray (FuncDecl< R > f)
 
final< D extends Sort, R extends Sort > Expr< D > mkArrayExt (Expr< ArraySort< D, R > > arg1, Expr< ArraySort< D, R > > arg2)
 
final< D extends Sort > SetSort< D > mkSetSort (D ty)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkEmptySet (D domain)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkFullSet (D domain)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetAdd (Expr< ArraySort< D, BoolSort > > set, Expr< D > element)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetDel (Expr< ArraySort< D, BoolSort > > set, Expr< D > element)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetUnion (Expr< ArraySort< D, BoolSort > >... args)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetIntersection (Expr< ArraySort< D, BoolSort > >... args)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetDifference (Expr< ArraySort< D, BoolSort > > arg1, Expr< ArraySort< D, BoolSort > > arg2)
 
final< D extends Sort > ArrayExpr< D, BoolSort > mkSetComplement (Expr< ArraySort< D, BoolSort > > arg)
 
final< D extends Sort > BoolExpr mkSetMembership (Expr< D > elem, Expr< ArraySort< D, BoolSort > > set)
 
final< D extends Sort > BoolExpr mkSetSubset (Expr< ArraySort< D, BoolSort > > arg1, Expr< ArraySort< D, BoolSort > > arg2)
 
final FiniteSetSort mkFiniteSetSort (Sort elemSort)
 
final boolean isFiniteSetSort (Sort s)
 
final Sort getFiniteSetSortBasis (Sort s)
 
final Expr mkFiniteSetEmpty (Sort setSort)
 
final Expr mkFiniteSetSingleton (Expr elem)
 
final Expr mkFiniteSetUnion (Expr s1, Expr s2)
 
final Expr mkFiniteSetIntersect (Expr s1, Expr s2)
 
final Expr mkFiniteSetDifference (Expr s1, Expr s2)
 
final BoolExpr mkFiniteSetMember (Expr elem, Expr set)
 
final Expr mkFiniteSetSize (Expr set)
 
final BoolExpr mkFiniteSetSubset (Expr s1, Expr s2)
 
final Expr mkFiniteSetMap (Expr f, Expr set)
 
final Expr mkFiniteSetFilter (Expr f, Expr set)
 
final Expr mkFiniteSetRange (Expr low, Expr high)
 
final< R extends Sort > SeqExpr< R > mkEmptySeq (R s)
 
final< R extends Sort > SeqExpr< R > mkUnit (Expr< R > elem)
 
SeqExpr< CharSort > mkString (String s)
 
SeqExpr< CharSort > intToString (Expr< IntSort > e)
 
SeqExpr< CharSort > ubvToString (Expr< BitVecSort > e)
 
SeqExpr< CharSort > sbvToString (Expr< BitVecSort > e)
 
IntExpr stringToInt (Expr< SeqSort< CharSort > > e)
 
final< R extends Sort > SeqExpr< R > mkConcat (Expr< SeqSort< R > >... t)
 
final< R extends Sort > IntExpr mkLength (Expr< SeqSort< R > > s)
 
final< R extends Sort > SeqExpr< R > mkSeqPower (Expr< SeqSort< R > > s, Expr< IntSort > n)
 
final< R extends Sort > BoolExpr mkPrefixOf (Expr< SeqSort< R > > s1, Expr< SeqSort< R > > s2)
 
final< R extends Sort > BoolExpr mkSuffixOf (Expr< SeqSort< R > > s1, Expr< SeqSort< R > > s2)
 
final< R extends Sort > BoolExpr mkContains (Expr< SeqSort< R > > s1, Expr< SeqSort< R > > s2)
 
BoolExpr MkStringLt (Expr< SeqSort< CharSort > > s1, Expr< SeqSort< CharSort > > s2)
 
BoolExpr MkStringLe (Expr< SeqSort< CharSort > > s1, Expr< SeqSort< CharSort > > s2)
 
final< R extends Sort > SeqExpr< R > mkAt (Expr< SeqSort< R > > s, Expr< IntSort > index)
 
final< R extends Sort > Expr< R > mkNth (Expr< SeqSort< R > > s, Expr< IntSort > index)
 
final< R extends Sort > SeqExpr< R > mkExtract (Expr< SeqSort< R > > s, Expr< IntSort > offset, Expr< IntSort > length)
 
final< R extends Sort > IntExpr mkIndexOf (Expr< SeqSort< R > > s, Expr< SeqSort< R > > substr, Expr< IntSort > offset)
 
final< R extends Sort > IntExpr mkLastIndexOf (Expr< SeqSort< R > > s, Expr< SeqSort< R > > substr)
 
final< R extends Sort > SeqExpr< R > mkSeqMap (Expr<?> f, Expr< SeqSort< R > > s)
 
final< R extends Sort > SeqExpr< R > mkSeqMapi (Expr<?> f, Expr< IntSort > i, Expr< SeqSort< R > > s)
 
final< R extends Sort, A extends Sort > Expr< A > mkSeqFoldl (Expr<?> f, Expr< A > a, Expr< SeqSort< R > > s)
 
final< R extends Sort, A extends Sort > Expr< A > mkSeqFoldli (Expr<?> f, Expr< IntSort > i, Expr< A > a, Expr< SeqSort< R > > s)
 
final< R extends Sort > SeqExpr< R > mkReplace (Expr< SeqSort< R > > s, Expr< SeqSort< R > > src, Expr< SeqSort< R > > dst)
 
final< R extends Sort > SeqExpr< R > mkReplaceAll (Expr< SeqSort< R > > s, Expr< SeqSort< R > > src, Expr< SeqSort< R > > dst)
 
final< R extends Sort > SeqExpr< R > mkReplaceRe (Expr< SeqSort< R > > s, ReExpr< SeqSort< R > > re, Expr< SeqSort< R > > dst)
 
final< R extends Sort > SeqExpr< R > mkReplaceReAll (Expr< SeqSort< R > > s, ReExpr< SeqSort< R > > re, Expr< SeqSort< R > > dst)
 
final< R extends Sort > ReExpr< SeqSort< R > > mkToRe (Expr< SeqSort< R > > s)
 
final< R extends Sort > BoolExpr mkInRe (Expr< SeqSort< R > > s, ReExpr< SeqSort< R > > re)
 
final< R extends Sort > ReExpr< R > mkStar (Expr< ReSort< R > > re)
 
final< R extends Sort > ReExpr< R > mkPower (Expr< ReSort< R > > re, int n)
 
final< R extends Sort > ReExpr< R > mkLoop (Expr< ReSort< R > > re, int lo, int hi)
 
final< R extends Sort > ReExpr< R > mkLoop (Expr< ReSort< R > > re, int lo)
 
final< R extends Sort > ReExpr< R > mkPlus (Expr< ReSort< R > > re)
 
final< R extends Sort > ReExpr< R > mkOption (Expr< ReSort< R > > re)
 
final< R extends Sort > ReExpr< R > mkComplement (Expr< ReSort< R > > re)
 
final< R extends Sort > ReExpr< R > mkConcat (ReExpr< R >... t)
 
final< R extends Sort > ReExpr< R > mkUnion (Expr< ReSort< R > >... t)
 
final< R extends Sort > ReExpr< R > mkIntersect (Expr< ReSort< R > >... t)
 
final< R extends Sort > ReExpr< R > mkDiff (Expr< ReSort< R > > a, Expr< ReSort< R > > b)
 
final< R extends Sort > ReExpr< R > mkEmptyRe (ReSort< R > s)
 
final< R extends Sort > ReExpr< R > mkFullRe (ReSort< R > s)
 
final< R extends Sort > ReExpr< R > mkAllcharRe (ReSort< R > s)
 
final ReExpr< SeqSort< CharSort > > mkRange (Expr< SeqSort< CharSort > > lo, Expr< SeqSort< CharSort > > hi)
 
BoolExpr mkCharLe (Expr< CharSort > ch1, Expr< CharSort > ch2)
 
IntExpr charToInt (Expr< CharSort > ch)
 
BitVecExpr charToBv (Expr< CharSort > ch)
 
Expr< CharSort > charFromBv (BitVecExpr bv)
 
BoolExpr mkIsDigit (Expr< CharSort > ch)
 
BoolExpr mkAtMost (Expr< BoolSort >[] args, int k)
 
BoolExpr mkAtLeast (Expr< BoolSort >[] args, int k)
 
BoolExpr mkPBLe (int[] coeffs, Expr< BoolSort >[] args, int k)
 
BoolExpr mkPBGe (int[] coeffs, Expr< BoolSort >[] args, int k)
 
BoolExpr mkPBEq (int[] coeffs, Expr< BoolSort >[] args, int k)
 
final< R extends Sort > Expr< R > mkNumeral (String v, R ty)
 
final< R extends Sort > Expr< R > mkNumeral (int v, R ty)
 
final< R extends Sort > Expr< R > mkNumeral (long v, R ty)
 
RatNum mkReal (int num, int den)
 
RatNum mkReal (String v)
 
RatNum mkReal (int v)
 
RatNum mkReal (long v)
 
IntNum mkInt (String v)
 
IntNum mkInt (int v)
 
IntNum mkInt (long v)
 
BitVecNum mkBV (String v, int size)
 
BitVecNum mkBV (int v, int size)
 
BitVecNum mkBV (long v, int size)
 
Quantifier mkForall (Sort[] sorts, Symbol[] names, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
Quantifier mkForall (Expr<?>[] boundConstants, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
Quantifier mkExists (Sort[] sorts, Symbol[] names, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
Quantifier mkExists (Expr<?>[] boundConstants, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
Quantifier mkQuantifier (boolean universal, Sort[] sorts, Symbol[] names, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
Quantifier mkQuantifier (boolean universal, Expr<?>[] boundConstants, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
 
final< R extends Sort > Lambda< R > mkLambda (Sort[] sorts, Symbol[] names, Expr< R > body)
 
final< R extends Sort > Lambda< R > mkLambda (Expr<?>[] boundConstants, Expr< R > body)
 
void setPrintMode (Z3_ast_print_mode value)
 
String benchmarkToSMTString (String name, String logic, String status, String attributes, Expr< BoolSort >[] assumptions, Expr< BoolSort > formula)
 
BoolExpr[] parseSMTLIB2String (String str, Symbol[] sortNames, Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)
 
BoolExpr[] parseSMTLIB2File (String fileName, Symbol[] sortNames, Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)
 
Goal mkGoal (boolean models, boolean unsatCores, boolean proofs)
 
Params mkParams ()
 
int getNumTactics ()
 
String[] getTacticNames ()
 
String getTacticDescription (String name)
 
Tactic mkTactic (String name)
 
Tactic andThen (Tactic t1, Tactic t2, Tactic... ts)
 
Tactic then (Tactic t1, Tactic t2, Tactic... ts)
 
Tactic orElse (Tactic t1, Tactic t2)
 
Tactic tryFor (Tactic t, int ms)
 
Tactic when (Probe p, Tactic t)
 
Tactic cond (Probe p, Tactic t1, Tactic t2)
 
Tactic repeat (Tactic t, int max)
 
Tactic skip ()
 
Tactic fail ()
 
Tactic failIf (Probe p)
 
Tactic failIfNotDecided ()
 
Tactic usingParams (Tactic t, Params p)
 
Tactic with (Tactic t, Params p)
 
Tactic parOr (Tactic... t)
 
Tactic parAndThen (Tactic t1, Tactic t2)
 
void interrupt ()
 
ASTMap mkASTMap ()
 
Expr<?> qeLite (ASTVector vars, Expr<?> body)
 
Expr<?> qeModelProject (Model model, Expr<?>[] bounds, Expr<?> body)
 
Expr<?> qeModelProjectSkolem (Model model, Expr<?>[] bounds, Expr<?> body, ASTMap map)
 
Expr<?> qeModelProjectWithWitness (Model model, Expr<?>[] bounds, Expr<?> body, ASTMap map)
 
int getNumSimplifiers ()
 
String[] getSimplifierNames ()
 
String getSimplifierDescription (String name)
 
Simplifier mkSimplifier (String name)
 
Simplifier andThen (Simplifier t1, Simplifier t2, Simplifier... ts)
 
Simplifier then (Simplifier t1, Simplifier t2, Simplifier... ts)
 
Simplifier usingParams (Simplifier t, Params p)
 
Simplifier with (Simplifier t, Params p)
 
int getNumProbes ()
 
String[] getProbeNames ()
 
String getProbeDescription (String name)
 
Probe mkProbe (String name)
 
Probe constProbe (double val)
 
Probe lt (Probe p1, Probe p2)
 
Probe gt (Probe p1, Probe p2)
 
Probe le (Probe p1, Probe p2)
 
Probe ge (Probe p1, Probe p2)
 
Probe eq (Probe p1, Probe p2)
 
Probe and (Probe p1, Probe p2)
 
Probe or (Probe p1, Probe p2)
 
Probe not (Probe p)
 
Solver mkSolver ()
 
Solver mkSolver (Symbol logic)
 
Solver mkSolver (String logic)
 
Solver mkSimpleSolver ()
 
Solver mkSolver (Tactic t)
 
Solver mkSolver (Solver s, Simplifier simp)
 
Fixedpoint mkFixedpoint ()
 
Optimize mkOptimize ()
 
FPRMSort mkFPRoundingModeSort ()
 
FPRMExpr mkFPRoundNearestTiesToEven ()
 
FPRMNum mkFPRNE ()
 
FPRMNum mkFPRoundNearestTiesToAway ()
 
FPRMNum mkFPRNA ()
 
FPRMNum mkFPRoundTowardPositive ()
 
FPRMNum mkFPRTP ()
 
FPRMNum mkFPRoundTowardNegative ()
 
FPRMNum mkFPRTN ()
 
FPRMNum mkFPRoundTowardZero ()
 
FPRMNum mkFPRTZ ()
 
FPSort mkFPSort (int ebits, int sbits)
 
FPSort mkFPSortHalf ()
 
FPSort mkFPSort16 ()
 
FPSort mkFPSortSingle ()
 
FPSort mkFPSort32 ()
 
FPSort mkFPSortDouble ()
 
FPSort mkFPSort64 ()
 
FPSort mkFPSortQuadruple ()
 
FPSort mkFPSort128 ()
 
FPNum mkFPNaN (FPSort s)
 
FPNum mkFPInf (FPSort s, boolean negative)
 
FPNum mkFPZero (FPSort s, boolean negative)
 
FPNum mkFPNumeral (float v, FPSort s)
 
FPNum mkFPNumeral (double v, FPSort s)
 
FPNum mkFPNumeral (int v, FPSort s)
 
FPNum mkFPNumeral (boolean sgn, int exp, int sig, FPSort s)
 
FPNum mkFPNumeral (boolean sgn, long exp, long sig, FPSort s)
 
FPNum mkFP (float v, FPSort s)
 
FPNum mkFP (double v, FPSort s)
 
FPNum mkFP (int v, FPSort s)
 
FPNum mkFP (boolean sgn, int exp, int sig, FPSort s)
 
FPNum mkFP (boolean sgn, long exp, long sig, FPSort s)
 
FPExpr mkFPAbs (Expr< FPSort > t)
 
FPExpr mkFPNeg (Expr< FPSort > t)
 
FPExpr mkFPAdd (Expr< FPRMSort > rm, Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPSub (Expr< FPRMSort > rm, Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPMul (Expr< FPRMSort > rm, Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPDiv (Expr< FPRMSort > rm, Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPFMA (Expr< FPRMSort > rm, Expr< FPSort > t1, Expr< FPSort > t2, Expr< FPSort > t3)
 
FPExpr mkFPSqrt (Expr< FPRMSort > rm, Expr< FPSort > t)
 
FPExpr mkFPRem (Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPRoundToIntegral (Expr< FPRMSort > rm, Expr< FPSort > t)
 
FPExpr mkFPMin (Expr< FPSort > t1, Expr< FPSort > t2)
 
FPExpr mkFPMax (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPLEq (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPLt (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPGEq (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPGt (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPEq (Expr< FPSort > t1, Expr< FPSort > t2)
 
BoolExpr mkFPIsNormal (Expr< FPSort > t)
 
BoolExpr mkFPIsSubnormal (Expr< FPSort > t)
 
BoolExpr mkFPIsZero (Expr< FPSort > t)
 
BoolExpr mkFPIsInfinite (Expr< FPSort > t)
 
BoolExpr mkFPIsNaN (Expr< FPSort > t)
 
BoolExpr mkFPIsNegative (Expr< FPSort > t)
 
BoolExpr mkFPIsPositive (Expr< FPSort > t)
 
FPExpr mkFP (Expr< BitVecSort > sgn, Expr< BitVecSort > sig, Expr< BitVecSort > exp)
 
FPExpr mkFPToFP (Expr< BitVecSort > bv, FPSort s)
 
FPExpr mkFPToFP (Expr< FPRMSort > rm, FPExpr t, FPSort s)
 
FPExpr mkFPToFP (Expr< FPRMSort > rm, RealExpr t, FPSort s)
 
FPExpr mkFPToFP (Expr< FPRMSort > rm, Expr< BitVecSort > t, FPSort s, boolean isSigned)
 
FPExpr mkFPToFP (FPSort s, Expr< FPRMSort > rm, Expr< FPSort > t)
 
BitVecExpr mkFPToBV (Expr< FPRMSort > rm, Expr< FPSort > t, int sz, boolean isSigned)
 
RealExpr mkFPToReal (Expr< FPSort > t)
 
BitVecExpr mkFPToIEEEBV (Expr< FPSort > t)
 
BitVecExpr mkFPToFP (Expr< FPRMSort > rm, Expr< IntSort > exp, Expr< RealSort > sig, FPSort s)
 
final< R extends Sort > FuncDecl< BoolSort > mkLinearOrder (R sort, int index)
 
final< R extends Sort > FuncDecl< BoolSort > mkPartialOrder (R sort, int index)
 
final< R extends Sort > FuncDecl< BoolSort > mkTransitiveClosure (FuncDecl< BoolSort > f)
 
final< R extends Sort > FuncDecl< BoolSort > mkPiecewiseLinearOrder (R sort, int index)
 
final< R extends Sort > FuncDecl< BoolSort > mkTreeOrder (R sort, int index)
 
final< R extends Sort > ASTVector polynomialSubresultants (Expr< R > p, Expr< R > q, Expr< R > x)
 
AST wrapAST (long nativeObject)
 
long unwrapAST (AST a)
 
String SimplifyHelp ()
 
ParamDescrs getSimplifyParameterDescriptions ()
 
void updateParamValue (String id, String value)
 
long nCtx ()
 
void close ()
 

Protected Member Functions

 Context (long m_ctx)
 

Detailed Description

The main interaction with Z3 happens via the Context. For applications that spawn an unbounded number of contexts, the proper use is within a try-with-resources scope so that the Context object gets garbage collected in a predictable way. Contexts maintain all data-structures related to terms and formulas that are created relative to them.

Definition at line 36 of file Context.java.

Constructor & Destructor Documentation

◆ Context() [1/3]

Context ( )
inline

Definition at line 40 of file Context.java.

40 {
41 synchronized (creation_lock) {
42 m_ctx = Native.mkContextRc(0);
43 init();
44 }
45 }

◆ Context() [2/3]

Context ( long  m_ctx)
inlineprotected

Definition at line 47 of file Context.java.

47 {
48 synchronized (creation_lock) {
49 this.m_ctx = m_ctx;
50 init();
51 }
52 }

◆ Context() [3/3]

Context ( Map< String, String >  settings)
inline

Constructor. Remarks: The following parameters can be set:

  • proof (Boolean) Enable proof generation
  • debug_ref_count (Boolean) Enable debug support for Z3_ast reference counting
  • trace (Boolean) Tracing support for VCC
  • trace_file_name (String) Trace out file for VCC traces
  • timeout (unsigned) default timeout (in milliseconds) used for solvers
  • well_sorted_check type checker
  • auto_config use heuristics to automatically select solver and configure it
  • model model generation for solvers, this parameter can be overwritten when creating a solver
  • model_validate validate models produced by solvers
  • unsat_core unsat-core generation for solvers, this parameter can be overwritten when creating a solver Note that in previous versions of Z3, this constructor was also used to set global and module parameters. For this purpose we should now use Global.setParameter

Definition at line 72 of file Context.java.

72 {
73 synchronized (creation_lock) {
74 long cfg = Native.mkConfig();
75 for (Map.Entry<String, String> kv : settings.entrySet()) {
76 Native.setParamValue(cfg, kv.getKey(), kv.getValue());
77 }
78 m_ctx = Native.mkContextRc(cfg);
79 Native.delConfig(cfg);
80 init();
81 }
82 }
Map(f, *args)
Definition z3py.py:5175

Member Function Documentation

◆ AddRecDef()

final< R extends Sort > void AddRecDef ( FuncDecl< R >  f,
Expr<?>[]  args,
Expr< R >  body 
)
inline

Bind a definition to a recursive function declaration. The function must have previously been created using MkRecFuncDecl. The body may contain recursive uses of the function or other mutually recursive functions.

Definition at line 670 of file Context.java.

671 {
672 checkContextMatch(f);
673 checkContextMatch(args);
674 checkContextMatch(body);
675 long[] argsNative = AST.arrayToNative(args);
676 Native.addRecDef(nCtx(), f.getNativeObject(), args.length, argsNative, body.getNativeObject());
677 }

◆ and()

Probe and ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value p1 and p2 evaluate to true.

Definition at line 3811 of file Context.java.

3812 {
3813 checkContextMatch(p1);
3814 checkContextMatch(p2);
3815 return new Probe(this, Native.probeAnd(nCtx(), p1.getNativeObject(),
3816 p2.getNativeObject()));
3817 }

◆ andThen() [1/2]

Simplifier andThen ( Simplifier  t1,
Simplifier  t2,
Simplifier...  ts 
)
inline

Create a simplifier that applies t1 and then t1

Definition at line 3641 of file Context.java.

3643 {
3644 checkContextMatch(t1);
3645 checkContextMatch(t2);
3646 checkContextMatch(ts);
3647
3648 long last = 0;
3649 if (ts != null && ts.length > 0)
3650 {
3651 last = ts[ts.length - 1].getNativeObject();
3652 for (int i = ts.length - 2; i >= 0; i--) {
3653 last = Native.simplifierAndThen(nCtx(), ts[i].getNativeObject(),
3654 last);
3655 }
3656 }
3657 if (last != 0)
3658 {
3659 last = Native.simplifierAndThen(nCtx(), t2.getNativeObject(), last);
3660 return new Simplifier(this, Native.simplifierAndThen(nCtx(),
3661 t1.getNativeObject(), last));
3662 } else
3663 return new Simplifier(this, Native.simplifierAndThen(nCtx(),
3664 t1.getNativeObject(), t2.getNativeObject()));
3665 }

◆ andThen() [2/2]

Tactic andThen ( Tactic  t1,
Tactic  t2,
Tactic...  ts 
)
inline

Create a tactic that applies t1 to a Goal and then t2 to every subgoal produced by t1

Definition at line 3345 of file Context.java.

3347 {
3348 checkContextMatch(t1);
3349 checkContextMatch(t2);
3350 checkContextMatch(ts);
3351
3352 long last = 0;
3353 if (ts != null && ts.length > 0)
3354 {
3355 last = ts[ts.length - 1].getNativeObject();
3356 for (int i = ts.length - 2; i >= 0; i--) {
3357 last = Native.tacticAndThen(nCtx(), ts[i].getNativeObject(),
3358 last);
3359 }
3360 }
3361 if (last != 0)
3362 {
3363 last = Native.tacticAndThen(nCtx(), t2.getNativeObject(), last);
3364 return new Tactic(this, Native.tacticAndThen(nCtx(),
3365 t1.getNativeObject(), last));
3366 } else
3367 return new Tactic(this, Native.tacticAndThen(nCtx(),
3368 t1.getNativeObject(), t2.getNativeObject()));
3369 }

◆ benchmarkToSMTString()

String benchmarkToSMTString ( String  name,
String  logic,
String  status,
String  attributes,
Expr< BoolSort >[]  assumptions,
Expr< BoolSort >  formula 
)
inline

Convert a benchmark into an SMT-LIB formatted string.

Parameters
nameName of the benchmark. The argument is optional.
logicThe benchmark logic.
statusThe status string (sat, unsat, or unknown)
attributesOther attributes, such as source, difficulty or category.
assumptionsAuxiliary assumptions.
formulaFormula to be checked for consistency in conjunction with assumptions.
Returns
A string representation of the benchmark.

Definition at line 3223 of file Context.java.

3226 {
3227
3228 return Native.benchmarkToSmtlibString(nCtx(), name, logic, status,
3229 attributes, assumptions.length,
3230 AST.arrayToNative(assumptions), formula.getNativeObject());
3231 }

◆ charFromBv()

Expr< CharSort > charFromBv ( BitVecExpr  bv)
inline

Create a character from a bit-vector (code point).

Definition at line 2813 of file Context.java.

2814 {
2815 checkContextMatch(bv);
2816 return (Expr<CharSort>) Expr.create(this, Native.mkCharFromBv(nCtx(), bv.getNativeObject()));
2817 }

◆ charToBv()

BitVecExpr charToBv ( Expr< CharSort >  ch)
inline

Create a bit-vector (code point) from character.

Definition at line 2804 of file Context.java.

2805 {
2806 checkContextMatch(ch);
2807 return (BitVecExpr) Expr.create(this, Native.mkCharToBv(nCtx(), ch.getNativeObject()));
2808 }

◆ charToInt()

IntExpr charToInt ( Expr< CharSort >  ch)
inline

Create an integer (code point) from character.

Definition at line 2795 of file Context.java.

2796 {
2797 checkContextMatch(ch);
2798 return (IntExpr) Expr.create(this, Native.mkCharToInt(nCtx(), ch.getNativeObject()));
2799 }

◆ close()

void close ( )
inline

Disposes of the context.

Definition at line 4904 of file Context.java.

4905 {
4906 if (m_ctx == 0)
4907 return;
4908
4909 m_RefQueue.forceClear();
4910
4911 m_boolSort = null;
4912 m_intSort = null;
4913 m_realSort = null;
4914 m_complexSort = null;
4915 m_stringSort = null;
4916 m_RefQueue = null;
4917
4918 synchronized (creation_lock) {
4919 Native.delContext(m_ctx);
4920 }
4921 m_ctx = 0;
4922 }

◆ cond()

Tactic cond ( Probe  p,
Tactic  t1,
Tactic  t2 
)
inline

Create a tactic that applies t1 to a given goal if the probe p evaluates to true and t2 otherwise.

Definition at line 3427 of file Context.java.

3428 {
3429 checkContextMatch(p);
3430 checkContextMatch(t1);
3431 checkContextMatch(t2);
3432 return new Tactic(this, Native.tacticCond(nCtx(), p.getNativeObject(),
3433 t1.getNativeObject(), t2.getNativeObject()));
3434 }

◆ constProbe()

Probe constProbe ( double  val)
inline

Create a probe that always evaluates to val.

Definition at line 3741 of file Context.java.

3742 {
3743 return new Probe(this, Native.probeConst(nCtx(), val));
3744 }

◆ eq()

Probe eq ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value returned by p1 is equal to the value returned by p2

Definition at line 3800 of file Context.java.

3801 {
3802 checkContextMatch(p1);
3803 checkContextMatch(p2);
3804 return new Probe(this, Native.probeEq(nCtx(), p1.getNativeObject(),
3805 p2.getNativeObject()));
3806 }

Referenced by AstRef.__eq__(), SortRef.cast(), and FiniteSetSortRef.cast().

◆ fail()

Tactic fail ( )
inline

Create a tactic always fails.

Definition at line 3458 of file Context.java.

3459 {
3460 return new Tactic(this, Native.tacticFail(nCtx()));
3461 }

◆ failIf()

Tactic failIf ( Probe  p)
inline

Create a tactic that fails if the probe p evaluates to false.

Definition at line 3467 of file Context.java.

3468 {
3469 checkContextMatch(p);
3470 return new Tactic(this,
3471 Native.tacticFailIf(nCtx(), p.getNativeObject()));
3472 }

◆ failIfNotDecided()

Tactic failIfNotDecided ( )
inline

Create a tactic that fails if the goal is not trivially satisfiable (i.e., empty) or trivially unsatisfiable (i.e., contains ‘false’).

Definition at line 3478 of file Context.java.

3479 {
3480 return new Tactic(this, Native.tacticFailIfNotDecided(nCtx()));
3481 }

◆ ge()

Probe ge ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value returned by p1 is greater than or equal the value returned by p2

Definition at line 3788 of file Context.java.

3789 {
3790 checkContextMatch(p1);
3791 checkContextMatch(p2);
3792 return new Probe(this, Native.probeGe(nCtx(), p1.getNativeObject(),
3793 p2.getNativeObject()));
3794 }

◆ getBoolSort()

BoolSort getBoolSort ( )
inline

Retrieves the Boolean sort of the context.

Definition at line 129 of file Context.java.

130 {
131 if (m_boolSort == null) {
132 m_boolSort = new BoolSort(this);
133 }
134 return m_boolSort;
135 }
BoolSort(ctx=None)
Definition z3py.py:1851

◆ getComplexSort()

ComplexSort getComplexSort ( )
inline

Retrieves the Complex sort of the context.

Definition at line 160 of file Context.java.

161 {
162 if (m_complexSort == null) {
163 m_complexSort = new ComplexSort(this);
164 }
165 return m_complexSort;
166 }
ComplexSort(ctx=None)
Definition z3py.py:3351

◆ getFiniteSetSortBasis()

final Sort getFiniteSetSortBasis ( Sort  s)
inline

Get the element sort (basis) of a finite set sort.

Definition at line 2244 of file Context.java.

2245 {
2246 checkContextMatch(s);
2247 return Sort.create(this, Native.getFiniteSetSortBasis(nCtx(), s.getNativeObject()));
2248 }

Referenced by FiniteSetSort.getBasis().

◆ getIntSort()

IntSort getIntSort ( )
inline

Retrieves the Integer sort of the context.

Definition at line 140 of file Context.java.

141 {
142 if (m_intSort == null) {
143 m_intSort = new IntSort(this);
144 }
145 return m_intSort;
146 }
IntSort(ctx=None)
Definition z3py.py:3419

◆ getNumProbes()

int getNumProbes ( )
inline

The number of supported Probes.

Definition at line 3703 of file Context.java.

3704 {
3705 return Native.getNumProbes(nCtx());
3706 }

◆ getNumSimplifiers()

int getNumSimplifiers ( )
inline

The number of supported simplifiers.

Definition at line 3603 of file Context.java.

3604 {
3605 return Native.getNumSimplifiers(nCtx());
3606 }

◆ getNumTactics()

int getNumTactics ( )
inline

The number of supported tactics.

Definition at line 3306 of file Context.java.

3307 {
3308 return Native.getNumTactics(nCtx());
3309 }

◆ getProbeDescription()

String getProbeDescription ( String  name)
inline

Returns a string containing a description of the probe with the given name.

Definition at line 3725 of file Context.java.

3726 {
3727 return Native.probeGetDescr(nCtx(), name);
3728 }

◆ getProbeNames()

String[] getProbeNames ( )
inline

The names of all supported Probes.

Definition at line 3711 of file Context.java.

3712 {
3713
3714 int n = getNumProbes();
3715 String[] res = new String[n];
3716 for (int i = 0; i < n; i++)
3717 res[i] = Native.getProbeName(nCtx(), i);
3718 return res;
3719 }
String(name, ctx=None)
Definition z3py.py:11932

◆ getRealSort()

RealSort getRealSort ( )
inline

Retrieves the Real sort of the context.

Definition at line 151 of file Context.java.

152 {
153 if (m_realSort == null) {
154 m_realSort = new RealSort(this);
155 }
156 return m_realSort;
157 }
RealSort(ctx=None)
Definition z3py.py:3436

◆ getSimplifierDescription()

String getSimplifierDescription ( String  name)
inline

Returns a string containing a description of the simplifier with the given name.

Definition at line 3625 of file Context.java.

3626 {
3627 return Native.simplifierGetDescr(nCtx(), name);
3628 }

◆ getSimplifierNames()

String[] getSimplifierNames ( )
inline

The names of all supported simplifiers.

Definition at line 3611 of file Context.java.

3612 {
3613
3614 int n = getNumSimplifiers();
3615 String[] res = new String[n];
3616 for (int i = 0; i < n; i++)
3617 res[i] = Native.getSimplifierName(nCtx(), i);
3618 return res;
3619 }

◆ getSimplifyParameterDescriptions()

ParamDescrs getSimplifyParameterDescriptions ( )
inline

Retrieves parameter descriptions for simplifier.

Definition at line 4835 of file Context.java.

4836 {
4837 return new ParamDescrs(this, Native.simplifyGetParamDescrs(nCtx()));
4838 }

◆ getStringSort()

SeqSort< CharSort > getStringSort ( )
inline

Retrieves the String sort of the context.

Definition at line 194 of file Context.java.

195 {
196 if (m_stringSort == null) {
197 m_stringSort = mkStringSort();
198 }
199 return m_stringSort;
200 }
SeqSort< CharSort > mkStringSort()
Definition Context.java:267

◆ getTacticDescription()

String getTacticDescription ( String  name)
inline

Returns a string containing a description of the tactic with the given name.

Definition at line 3328 of file Context.java.

3329 {
3330 return Native.tacticGetDescr(nCtx(), name);
3331 }

◆ getTacticNames()

String[] getTacticNames ( )
inline

The names of all supported tactics.

Definition at line 3314 of file Context.java.

3315 {
3316
3317 int n = getNumTactics();
3318 String[] res = new String[n];
3319 for (int i = 0; i < n; i++)
3320 res[i] = Native.getTacticName(nCtx(), i);
3321 return res;
3322 }

◆ gt()

Probe gt ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value returned by p1 is greater than the value returned by p2

Definition at line 3762 of file Context.java.

3763 {
3764 checkContextMatch(p1);
3765 checkContextMatch(p2);
3766 return new Probe(this, Native.probeGt(nCtx(), p1.getNativeObject(),
3767 p2.getNativeObject()));
3768 }

◆ interrupt()

void interrupt ( )
inline

Interrupt the execution of a Z3 procedure. Remarks: This procedure can be used to interrupt: solvers, simplifiers and tactics.

Definition at line 3533 of file Context.java.

3534 {
3535 Native.interrupt(nCtx());
3536 }

◆ intToString()

SeqExpr< CharSort > intToString ( Expr< IntSort >  e)
inline

Convert an integer expression to a string.

Definition at line 2399 of file Context.java.

2400 {
2401 return (SeqExpr<CharSort>) Expr.create(this, Native.mkIntToStr(nCtx(), e.getNativeObject()));
2402 }

◆ isFiniteSetSort()

final boolean isFiniteSetSort ( Sort  s)
inline

Check if a sort is a finite set sort.

Definition at line 2235 of file Context.java.

2236 {
2237 checkContextMatch(s);
2238 return Native.isFiniteSetSort(nCtx(), s.getNativeObject());
2239 }

◆ le()

Probe le ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value returned by p1 is less than or equal the value returned by p2

Definition at line 3775 of file Context.java.

3776 {
3777 checkContextMatch(p1);
3778 checkContextMatch(p2);
3779 return new Probe(this, Native.probeLe(nCtx(), p1.getNativeObject(),
3780 p2.getNativeObject()));
3781 }

◆ lt()

Probe lt ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value returned by p1 is less than the value returned by p2

Definition at line 3750 of file Context.java.

3751 {
3752 checkContextMatch(p1);
3753 checkContextMatch(p2);
3754 return new Probe(this, Native.probeLt(nCtx(), p1.getNativeObject(),
3755 p2.getNativeObject()));
3756 }

◆ mkAdd()

final< R extends ArithSort > ArithExpr< R > mkAdd ( Expr<? extends R >...  t)
inline

Create an expression representing t[0] + t[1] + ....

Definition at line 1031 of file Context.java.

1032 {
1033 checkContextMatch(t);
1034 return (ArithExpr<R>) Expr.create(this,
1035 Native.mkAdd(nCtx(), t.length, AST.arrayToNative(t)));
1036 }

◆ mkAllcharRe()

final< R extends Sort > ReExpr< R > mkAllcharRe ( ReSort< R >  s)
inline

Create regular expression that accepts all characters R has to be a sequence sort. Corresponds to re.allchar

Definition at line 2769 of file Context.java.

2770 {
2771 return (ReExpr<R>) Expr.create(this, Native.mkReAllchar(nCtx(), s.getNativeObject()));
2772 }

◆ mkAnd()

final BoolExpr mkAnd ( Expr< BoolSort >...  t)
inline

Create an expression representing t[0] and t[1] and ....

Definition at line 1009 of file Context.java.

1010 {
1011 checkContextMatch(t);
1012 return new BoolExpr(this, Native.mkAnd(nCtx(), t.length,
1013 AST.arrayToNative(t)));
1014 }

Referenced by Goal.AsBoolExpr().

◆ mkApp()

final< R extends Sort > Expr< R > mkApp ( FuncDecl< R >  f,
Expr<?>...  args 
)
inline

Create a new function application.

Definition at line 894 of file Context.java.

895 {
896 checkContextMatch(f);
897 checkContextMatch(args);
898 return Expr.create(this, f, args);
899 }

Referenced by ListSort< R extends Sort >.getNil().

◆ mkArrayConst() [1/2]

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkArrayConst ( String  name,
D  domain,
R  range 
)
inline

Create an array constant.

Definition at line 1919 of file Context.java.

1921 {
1922 return (ArrayExpr<D, R>) mkConst(mkSymbol(name), mkArraySort(domain, range));
1923 }
final< D extends Sort, R extends Sort > ArraySort< D, R > mkArraySort(D domain, R range)
Definition Context.java:246
final< R extends Sort > Expr< R > mkConst(Symbol name, R range)
Definition Context.java:752
IntSymbol mkSymbol(int i)
Definition Context.java:94

◆ mkArrayConst() [2/2]

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkArrayConst ( Symbol  name,
D  domain,
R  range 
)
inline

Create an array constant.

Definition at line 1910 of file Context.java.

1912 {
1913 return (ArrayExpr<D, R>) mkConst(name, mkArraySort(domain, range));
1914 }

◆ mkArrayExt()

final< D extends Sort, R extends Sort > Expr< D > mkArrayExt ( Expr< ArraySort< D, R > >  arg1,
Expr< ArraySort< D, R > >  arg2 
)
inline

Create Extentionality index. Two arrays are equal if and only if they are equal on the index returned by MkArrayExt.

Definition at line 2087 of file Context.java.

2088 {
2089 checkContextMatch(arg1);
2090 checkContextMatch(arg2);
2091 return (Expr<D>) Expr.create(this, Native.mkArrayExt(nCtx(), arg1.getNativeObject(), arg2.getNativeObject()));
2092 }

◆ mkArraySort() [1/2]

final< D extends Sort, R extends Sort > ArraySort< D, R > mkArraySort ( D  domain,
R  range 
)
inline

Create a new array sort.

Definition at line 246 of file Context.java.

247 {
248 checkContextMatch(domain);
249 checkContextMatch(range);
250 return new ArraySort<>(this, domain, range);
251 }

◆ mkArraySort() [2/2]

final< R extends Sort > ArraySort< Sort, R > mkArraySort ( Sort[]  domains,
R  range 
)
inline

Create a new array sort.

Definition at line 257 of file Context.java.

258 {
259 checkContextMatch(domains);
260 checkContextMatch(range);
261 return new ArraySort<>(this, domains, range);
262 }

◆ mkAsArray()

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkAsArray ( FuncDecl< R >  f)
inline

Create an as-array expression from a function declaration.

Parameters
fthe function declaration to lift into an array. Must have exactly one domain sort.
See also
Context::mkTermArray
Context::mkMap

Definition at line 2078 of file Context.java.

2079 {
2080 checkContextMatch(f);
2081 return (ArrayExpr<D, R>) Expr.create(this, Native.mkAsArray(nCtx(), f.getNativeObject()));
2082 }

◆ mkASTMap()

ASTMap mkASTMap ( )
inline

Creates an empty map from ASTs to ASTs.

Definition at line 3541 of file Context.java.

3542 {
3543 return new ASTMap(this);
3544 }

◆ mkAt()

final< R extends Sort > SeqExpr< R > mkAt ( Expr< SeqSort< R > >  s,
Expr< IntSort >  index 
)
inline

Retrieve sequence of length one at index.

Definition at line 2507 of file Context.java.

2508 {
2509 checkContextMatch(s, index);
2510 return (SeqExpr<R>) Expr.create(this, Native.mkSeqAt(nCtx(), s.getNativeObject(), index.getNativeObject()));
2511 }

◆ mkAtLeast()

BoolExpr mkAtLeast ( Expr< BoolSort >[]  args,
int  k 
)
inline

Create an at-least-k constraint.

Definition at line 2840 of file Context.java.

2841 {
2842 checkContextMatch(args);
2843 return (BoolExpr) Expr.create(this, Native.mkAtleast(nCtx(), args.length, AST.arrayToNative(args), k));
2844 }

◆ mkAtMost()

BoolExpr mkAtMost ( Expr< BoolSort >[]  args,
int  k 
)
inline

Create an at-most-k constraint.

Definition at line 2831 of file Context.java.

2832 {
2833 checkContextMatch(args);
2834 return (BoolExpr) Expr.create(this, Native.mkAtmost(nCtx(), args.length, AST.arrayToNative(args), k));
2835 }

◆ mkBitVecSort()

BitVecSort mkBitVecSort ( int  size)
inline

Create a new bit-vector sort.

Definition at line 238 of file Context.java.

239 {
240 return new BitVecSort(this, Native.mkBvSort(nCtx(), size));
241 }
BitVecSort(sz, ctx=None)
Definition z3py.py:4293

◆ mkBool()

BoolExpr mkBool ( boolean  value)
inline

Creates a Boolean value.

Definition at line 920 of file Context.java.

921 {
922 return value ? mkTrue() : mkFalse();
923 }

Referenced by UserPropagatorBase.conflict().

◆ mkBoolConst() [1/2]

BoolExpr mkBoolConst ( String  name)
inline

Create a Boolean constant.

Definition at line 803 of file Context.java.

804 {
805 return (BoolExpr) mkConst(mkSymbol(name), getBoolSort());
806 }

◆ mkBoolConst() [2/2]

BoolExpr mkBoolConst ( Symbol  name)
inline

Create a Boolean constant.

Definition at line 795 of file Context.java.

796 {
797 return (BoolExpr) mkConst(name, getBoolSort());
798 }

◆ mkBoolSort()

BoolSort mkBoolSort ( )
inline

Create a new Boolean sort.

Definition at line 177 of file Context.java.

178 {
179 return new BoolSort(this);
180 }

◆ mkBound()

final< R extends Sort > Expr< R > mkBound ( int  index,
R  ty 
)
inline

Creates a new bound variable.

Parameters
indexThe de-Bruijn index of the variable
tyThe sort of the variable

Definition at line 728 of file Context.java.

729 {
730 return (Expr<R>) Expr.create(this,
731 Native.mkBound(nCtx(), index, ty.getNativeObject()));
732 }

◆ mkBV() [1/3]

BitVecNum mkBV ( int  v,
int  size 
)
inline

Create a bit-vector numeral.

Parameters
vvalue of the numeral.
sizethe size of the bit-vector

Definition at line 3033 of file Context.java.

3034 {
3035 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
3036 }
final< R extends Sort > Expr< R > mkNumeral(String v, R ty)
BitVecSort mkBitVecSort(int size)
Definition Context.java:238

◆ mkBV() [2/3]

BitVecNum mkBV ( long  v,
int  size 
)
inline

Create a bit-vector numeral.

Parameters
vvalue of the numeral. *
sizethe size of the bit-vector

Definition at line 3043 of file Context.java.

3044 {
3045 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
3046 }

◆ mkBV() [3/3]

BitVecNum mkBV ( String  v,
int  size 
)
inline

Create a bit-vector numeral.

Parameters
vA string representing the value in decimal notation.
sizethe size of the bit-vector

Definition at line 3023 of file Context.java.

3024 {
3025 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
3026 }

◆ mkBV2Int()

IntExpr mkBV2Int ( Expr< BitVecSort >  t,
boolean signed   
)
inline

Create an integer from the bit-vector argument t. Remarks: If is_signed is false, then the bit-vector 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 is_signed is true, 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.

Definition at line 1790 of file Context.java.

1791 {
1792 checkContextMatch(t);
1793 return new IntExpr(this, Native.mkBv2int(nCtx(), t.getNativeObject(),
1794 (signed)));
1795 }

◆ mkBVAdd()

BitVecExpr mkBVAdd ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement addition. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1353 of file Context.java.

1354 {
1355 checkContextMatch(t1);
1356 checkContextMatch(t2);
1357 return new BitVecExpr(this, Native.mkBvadd(nCtx(),
1358 t1.getNativeObject(), t2.getNativeObject()));
1359 }

◆ mkBVAddNoOverflow()

BoolExpr mkBVAddNoOverflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2,
boolean  isSigned 
)
inline

Create a predicate that checks that the bit-wise addition does not overflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1802 of file Context.java.

1804 {
1805 checkContextMatch(t1);
1806 checkContextMatch(t2);
1807 return new BoolExpr(this, Native.mkBvaddNoOverflow(nCtx(), t1
1808 .getNativeObject(), t2.getNativeObject(), (isSigned)));
1809 }

◆ mkBVAddNoUnderflow()

BoolExpr mkBVAddNoUnderflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Create a predicate that checks that the bit-wise addition does not underflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1816 of file Context.java.

1818 {
1819 checkContextMatch(t1);
1820 checkContextMatch(t2);
1821 return new BoolExpr(this, Native.mkBvaddNoUnderflow(nCtx(),
1822 t1.getNativeObject(), t2.getNativeObject()));
1823 }

◆ mkBVAND()

BitVecExpr mkBVAND ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise conjunction. Remarks: The arguments must have a bit-vector sort.

Definition at line 1264 of file Context.java.

1265 {
1266 checkContextMatch(t1);
1267 checkContextMatch(t2);
1268 return new BitVecExpr(this, Native.mkBvand(nCtx(),
1269 t1.getNativeObject(), t2.getNativeObject()));
1270 }

◆ mkBVASHR()

BitVecExpr mkBVASHR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

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.

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.

Definition at line 1698 of file Context.java.

1699 {
1700 checkContextMatch(t1);
1701 checkContextMatch(t2);
1702 return new BitVecExpr(this, Native.mkBvashr(nCtx(),
1703 t1.getNativeObject(), t2.getNativeObject()));
1704 }

◆ mkBVConst() [1/2]

BitVecExpr mkBVConst ( String  name,
int  size 
)
inline

Creates a bit-vector constant.

Definition at line 885 of file Context.java.

886 {
887 return (BitVecExpr) mkConst(name, mkBitVecSort(size));
888 }

◆ mkBVConst() [2/2]

BitVecExpr mkBVConst ( Symbol  name,
int  size 
)
inline

Creates a bit-vector constant.

Definition at line 877 of file Context.java.

878 {
879 return (BitVecExpr) mkConst(name, mkBitVecSort(size));
880 }

◆ mkBVLSHR()

BitVecExpr mkBVLSHR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Logical shift right Remarks: It is equivalent to unsigned division by 2^x where 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.

Definition at line 1678 of file Context.java.

1679 {
1680 checkContextMatch(t1);
1681 checkContextMatch(t2);
1682 return new BitVecExpr(this, Native.mkBvlshr(nCtx(),
1683 t1.getNativeObject(), t2.getNativeObject()));
1684 }

◆ mkBVMul()

BitVecExpr mkBVMul ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement multiplication. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1379 of file Context.java.

1380 {
1381 checkContextMatch(t1);
1382 checkContextMatch(t2);
1383 return new BitVecExpr(this, Native.mkBvmul(nCtx(),
1384 t1.getNativeObject(), t2.getNativeObject()));
1385 }

◆ mkBVMulNoOverflow()

BoolExpr mkBVMulNoOverflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2,
boolean  isSigned 
)
inline

Create a predicate that checks that the bit-wise multiplication does not overflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1884 of file Context.java.

1886 {
1887 checkContextMatch(t1);
1888 checkContextMatch(t2);
1889 return new BoolExpr(this, Native.mkBvmulNoOverflow(nCtx(), t1
1890 .getNativeObject(), t2.getNativeObject(), (isSigned)));
1891 }

◆ mkBVMulNoUnderflow()

BoolExpr mkBVMulNoUnderflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Create a predicate that checks that the bit-wise multiplication does not underflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1898 of file Context.java.

1900 {
1901 checkContextMatch(t1);
1902 checkContextMatch(t2);
1903 return new BoolExpr(this, Native.mkBvmulNoUnderflow(nCtx(),
1904 t1.getNativeObject(), t2.getNativeObject()));
1905 }

◆ mkBVNAND()

BitVecExpr mkBVNAND ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise NAND. Remarks: The arguments must have a bit-vector sort.

Definition at line 1303 of file Context.java.

1304 {
1305 checkContextMatch(t1);
1306 checkContextMatch(t2);
1307 return new BitVecExpr(this, Native.mkBvnand(nCtx(),
1308 t1.getNativeObject(), t2.getNativeObject()));
1309 }

◆ mkBVNeg()

BitVecExpr mkBVNeg ( Expr< BitVecSort >  t)
inline

Standard two's complement unary minus. Remarks: The arguments must have a bit-vector sort.

Definition at line 1342 of file Context.java.

1343 {
1344 checkContextMatch(t);
1345 return new BitVecExpr(this, Native.mkBvneg(nCtx(), t.getNativeObject()));
1346 }

◆ mkBVNegNoOverflow()

BoolExpr mkBVNegNoOverflow ( Expr< BitVecSort >  t)
inline

Create a predicate that checks that the bit-wise negation does not overflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1872 of file Context.java.

1873 {
1874 checkContextMatch(t);
1875 return new BoolExpr(this, Native.mkBvnegNoOverflow(nCtx(),
1876 t.getNativeObject()));
1877 }

◆ mkBVNOR()

BitVecExpr mkBVNOR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise NOR. Remarks: The arguments must have a bit-vector sort.

Definition at line 1316 of file Context.java.

1317 {
1318 checkContextMatch(t1);
1319 checkContextMatch(t2);
1320 return new BitVecExpr(this, Native.mkBvnor(nCtx(),
1321 t1.getNativeObject(), t2.getNativeObject()));
1322 }

◆ mkBVNot()

BitVecExpr mkBVNot ( Expr< BitVecSort >  t)
inline

Bitwise negation. Remarks: The argument must have a bit-vector sort.

Definition at line 1229 of file Context.java.

1230 {
1231 checkContextMatch(t);
1232 return new BitVecExpr(this, Native.mkBvnot(nCtx(), t.getNativeObject()));
1233 }

◆ mkBVOR()

BitVecExpr mkBVOR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise disjunction. Remarks: The arguments must have a bit-vector sort.

Definition at line 1277 of file Context.java.

1278 {
1279 checkContextMatch(t1);
1280 checkContextMatch(t2);
1281 return new BitVecExpr(this, Native.mkBvor(nCtx(), t1.getNativeObject(),
1282 t2.getNativeObject()));
1283 }

◆ mkBVRedAND()

BitVecExpr mkBVRedAND ( Expr< BitVecSort >  t)
inline

Take conjunction of bits in a vector, return vector of length 1.

Remarks: The argument must have a bit-vector sort.

Definition at line 1240 of file Context.java.

1241 {
1242 checkContextMatch(t);
1243 return new BitVecExpr(this, Native.mkBvredand(nCtx(),
1244 t.getNativeObject()));
1245 }

◆ mkBVRedOR()

BitVecExpr mkBVRedOR ( Expr< BitVecSort >  t)
inline

Take disjunction of bits in a vector, return vector of length 1.

Remarks: The argument must have a bit-vector sort.

Definition at line 1252 of file Context.java.

1253 {
1254 checkContextMatch(t);
1255 return new BitVecExpr(this, Native.mkBvredor(nCtx(),
1256 t.getNativeObject()));
1257 }

◆ mkBVRotateLeft() [1/2]

BitVecExpr mkBVRotateLeft ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Rotate Left. Remarks: Rotate bits of t1 to the left t2 times. The arguments must have the same bit-vector sort.

Definition at line 1736 of file Context.java.

1738 {
1739 checkContextMatch(t1);
1740 checkContextMatch(t2);
1741 return new BitVecExpr(this, Native.mkExtRotateLeft(nCtx(),
1742 t1.getNativeObject(), t2.getNativeObject()));
1743 }

◆ mkBVRotateLeft() [2/2]

BitVecExpr mkBVRotateLeft ( int  i,
Expr< BitVecSort >  t 
)
inline

Rotate Left. Remarks: Rotate bits of t to the left i times. The argument t must have a bit-vector sort.

Definition at line 1711 of file Context.java.

1712 {
1713 checkContextMatch(t);
1714 return new BitVecExpr(this, Native.mkRotateLeft(nCtx(), i,
1715 t.getNativeObject()));
1716 }

◆ mkBVRotateRight() [1/2]

BitVecExpr mkBVRotateRight ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Rotate Right. Remarks: Rotate bits of t1 to the rightt2 times. The arguments must have the same bit-vector sort.

Definition at line 1751 of file Context.java.

1753 {
1754 checkContextMatch(t1);
1755 checkContextMatch(t2);
1756 return new BitVecExpr(this, Native.mkExtRotateRight(nCtx(),
1757 t1.getNativeObject(), t2.getNativeObject()));
1758 }

◆ mkBVRotateRight() [2/2]

BitVecExpr mkBVRotateRight ( int  i,
Expr< BitVecSort >  t 
)
inline

Rotate Right. Remarks: Rotate bits of t to the right i times. The argument t must have a bit-vector sort.

Definition at line 1723 of file Context.java.

1724 {
1725 checkContextMatch(t);
1726 return new BitVecExpr(this, Native.mkRotateRight(nCtx(), i,
1727 t.getNativeObject()));
1728 }

◆ mkBVSDiv()

BitVecExpr mkBVSDiv ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Signed division. Remarks: It is defined in the following way:

  • The floor of t1/t2 if t2 is different from zero, and t1*t2 >= 0.
  • The ceiling of t1/t2 if t2 is different from zero, and t1*t2 &lt; 0.

If t2 is zero, then the result is undefined. The arguments must have the same bit-vector sort.

Definition at line 1415 of file Context.java.

1416 {
1417 checkContextMatch(t1);
1418 checkContextMatch(t2);
1419 return new BitVecExpr(this, Native.mkBvsdiv(nCtx(),
1420 t1.getNativeObject(), t2.getNativeObject()));
1421 }

◆ mkBVSDivNoOverflow()

BoolExpr mkBVSDivNoOverflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Create a predicate that checks that the bit-wise signed division does not overflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1858 of file Context.java.

1860 {
1861 checkContextMatch(t1);
1862 checkContextMatch(t2);
1863 return new BoolExpr(this, Native.mkBvsdivNoOverflow(nCtx(),
1864 t1.getNativeObject(), t2.getNativeObject()));
1865 }

◆ mkBVSGE()

BoolExpr mkBVSGE ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement signed greater than or equal to. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1540 of file Context.java.

1541 {
1542 checkContextMatch(t1);
1543 checkContextMatch(t2);
1544 return new BoolExpr(this, Native.mkBvsge(nCtx(), t1.getNativeObject(),
1545 t2.getNativeObject()));
1546 }

◆ mkBVSGT()

BoolExpr mkBVSGT ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement signed greater-than. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1566 of file Context.java.

1567 {
1568 checkContextMatch(t1);
1569 checkContextMatch(t2);
1570 return new BoolExpr(this, Native.mkBvsgt(nCtx(), t1.getNativeObject(),
1571 t2.getNativeObject()));
1572 }

◆ mkBVSHL()

BitVecExpr mkBVSHL ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Shift left. Remarks: It is equivalent to multiplication by 2^x where 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.

Definition at line 1659 of file Context.java.

1660 {
1661 checkContextMatch(t1);
1662 checkContextMatch(t2);
1663 return new BitVecExpr(this, Native.mkBvshl(nCtx(),
1664 t1.getNativeObject(), t2.getNativeObject()));
1665 }

◆ mkBVSLE()

BoolExpr mkBVSLE ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement signed less-than or equal to. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1514 of file Context.java.

1515 {
1516 checkContextMatch(t1);
1517 checkContextMatch(t2);
1518 return new BoolExpr(this, Native.mkBvsle(nCtx(), t1.getNativeObject(),
1519 t2.getNativeObject()));
1520 }

◆ mkBVSLT()

BoolExpr mkBVSLT ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement signed less-than Remarks: The arguments must have the same bit-vector sort.

Definition at line 1488 of file Context.java.

1489 {
1490 checkContextMatch(t1);
1491 checkContextMatch(t2);
1492 return new BoolExpr(this, Native.mkBvslt(nCtx(), t1.getNativeObject(),
1493 t2.getNativeObject()));
1494 }

◆ mkBVSMod()

BitVecExpr mkBVSMod ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement signed remainder (sign follows divisor). Remarks: If t2 is zero, then the result is undefined. The arguments must have the same bit-vector sort.

Definition at line 1462 of file Context.java.

1463 {
1464 checkContextMatch(t1);
1465 checkContextMatch(t2);
1466 return new BitVecExpr(this, Native.mkBvsmod(nCtx(),
1467 t1.getNativeObject(), t2.getNativeObject()));
1468 }

◆ mkBVSRem()

BitVecExpr mkBVSRem ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Signed remainder. Remarks: It is defined as 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 t1.

If t2 is zero, then the result is undefined. The arguments must have the same bit-vector sort.

Definition at line 1448 of file Context.java.

1449 {
1450 checkContextMatch(t1);
1451 checkContextMatch(t2);
1452 return new BitVecExpr(this, Native.mkBvsrem(nCtx(),
1453 t1.getNativeObject(), t2.getNativeObject()));
1454 }

◆ mkBVSub()

BitVecExpr mkBVSub ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Two's complement subtraction. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1366 of file Context.java.

1367 {
1368 checkContextMatch(t1);
1369 checkContextMatch(t2);
1370 return new BitVecExpr(this, Native.mkBvsub(nCtx(),
1371 t1.getNativeObject(), t2.getNativeObject()));
1372 }

◆ mkBVSubNoOverflow()

BoolExpr mkBVSubNoOverflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Create a predicate that checks that the bit-wise subtraction does not overflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1830 of file Context.java.

1832 {
1833 checkContextMatch(t1);
1834 checkContextMatch(t2);
1835 return new BoolExpr(this, Native.mkBvsubNoOverflow(nCtx(),
1836 t1.getNativeObject(), t2.getNativeObject()));
1837 }

◆ mkBVSubNoUnderflow()

BoolExpr mkBVSubNoUnderflow ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2,
boolean  isSigned 
)
inline

Create a predicate that checks that the bit-wise subtraction does not underflow. Remarks: The arguments must be of bit-vector sort.

Definition at line 1844 of file Context.java.

1846 {
1847 checkContextMatch(t1);
1848 checkContextMatch(t2);
1849 return new BoolExpr(this, Native.mkBvsubNoUnderflow(nCtx(), t1
1850 .getNativeObject(), t2.getNativeObject(), (isSigned)));
1851 }

◆ mkBVUDiv()

BitVecExpr mkBVUDiv ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned division. Remarks: It is defined as the floor of t1/t2 if t2 is different from zero. If t2 is zero, then the result is undefined. The arguments must have the same bit-vector sort.

Definition at line 1394 of file Context.java.

1395 {
1396 checkContextMatch(t1);
1397 checkContextMatch(t2);
1398 return new BitVecExpr(this, Native.mkBvudiv(nCtx(),
1399 t1.getNativeObject(), t2.getNativeObject()));
1400 }

◆ mkBVUGE()

BoolExpr mkBVUGE ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned greater than or equal to. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1527 of file Context.java.

1528 {
1529 checkContextMatch(t1);
1530 checkContextMatch(t2);
1531 return new BoolExpr(this, Native.mkBvuge(nCtx(), t1.getNativeObject(),
1532 t2.getNativeObject()));
1533 }

◆ mkBVUGT()

BoolExpr mkBVUGT ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned greater-than. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1553 of file Context.java.

1554 {
1555 checkContextMatch(t1);
1556 checkContextMatch(t2);
1557 return new BoolExpr(this, Native.mkBvugt(nCtx(), t1.getNativeObject(),
1558 t2.getNativeObject()));
1559 }

◆ mkBVULE()

BoolExpr mkBVULE ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned less-than or equal to. Remarks: The arguments must have the same bit-vector sort.

Definition at line 1501 of file Context.java.

1502 {
1503 checkContextMatch(t1);
1504 checkContextMatch(t2);
1505 return new BoolExpr(this, Native.mkBvule(nCtx(), t1.getNativeObject(),
1506 t2.getNativeObject()));
1507 }

◆ mkBVULT()

BoolExpr mkBVULT ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned less-than Remarks: The arguments must have the same bit-vector sort.

Definition at line 1475 of file Context.java.

1476 {
1477 checkContextMatch(t1);
1478 checkContextMatch(t2);
1479 return new BoolExpr(this, Native.mkBvult(nCtx(), t1.getNativeObject(),
1480 t2.getNativeObject()));
1481 }

◆ mkBVURem()

BitVecExpr mkBVURem ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Unsigned remainder. Remarks: It is defined as 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.

Definition at line 1430 of file Context.java.

1431 {
1432 checkContextMatch(t1);
1433 checkContextMatch(t2);
1434 return new BitVecExpr(this, Native.mkBvurem(nCtx(),
1435 t1.getNativeObject(), t2.getNativeObject()));
1436 }

◆ mkBVXNOR()

BitVecExpr mkBVXNOR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise XNOR. Remarks: The arguments must have a bit-vector sort.

Definition at line 1329 of file Context.java.

1330 {
1331 checkContextMatch(t1);
1332 checkContextMatch(t2);
1333 return new BitVecExpr(this, Native.mkBvxnor(nCtx(),
1334 t1.getNativeObject(), t2.getNativeObject()));
1335 }

◆ mkBVXOR()

BitVecExpr mkBVXOR ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bitwise XOR. Remarks: The arguments must have a bit-vector sort.

Definition at line 1290 of file Context.java.

1291 {
1292 checkContextMatch(t1);
1293 checkContextMatch(t2);
1294 return new BitVecExpr(this, Native.mkBvxor(nCtx(),
1295 t1.getNativeObject(), t2.getNativeObject()));
1296 }

◆ mkCharLe()

BoolExpr mkCharLe ( Expr< CharSort >  ch1,
Expr< CharSort >  ch2 
)
inline

Create less than or equal to between two characters.

Definition at line 2786 of file Context.java.

2787 {
2788 checkContextMatch(ch1, ch2);
2789 return (BoolExpr) Expr.create(this, Native.mkCharLe(nCtx(), ch1.getNativeObject(), ch2.getNativeObject()));
2790 }

◆ mkCharSort()

CharSort mkCharSort ( )
inline

Creates character sort object.

Definition at line 186 of file Context.java.

187 {
188 return new CharSort(this);
189 }
CharSort(ctx=None)
Definition z3py.py:11753

◆ mkComplement()

final< R extends Sort > ReExpr< R > mkComplement ( Expr< ReSort< R > >  re)
inline

Create the complement regular expression.

Definition at line 2700 of file Context.java.

2701 {
2702 checkContextMatch(re);
2703 return (ReExpr<R>) Expr.create(this, Native.mkReComplement(nCtx(), re.getNativeObject()));
2704 }

◆ mkComplex()

ComplexExpr mkComplex ( Expr<? extends ArithSort >  real,
Expr<? extends ArithSort >  imag 
)
inline

Constructs a Complex expression from Int or Real components.

Definition at line 853 of file Context.java.

854 {
855 checkContextMatch(real);
856 checkContextMatch(imag);
857 return new ComplexExpr(this, Native.mkComplex(nCtx(), real.getNativeObject(), imag.getNativeObject()));
858 }

◆ mkComplexConst() [1/2]

ComplexExpr mkComplexConst ( String  name)
inline

Creates a Complex constant.

Definition at line 847 of file Context.java.

848 {
849 return (ComplexExpr) mkConst(name, getComplexSort());
850 }
ComplexSort getComplexSort()
Definition Context.java:160

◆ mkComplexConst() [2/2]

ComplexExpr mkComplexConst ( Symbol  name)
inline

Creates a Complex constant.

Definition at line 841 of file Context.java.

842 {
843 return (ComplexExpr) mkConst(name, getComplexSort());
844 }

◆ mkComplexSort()

ComplexSort mkComplexSort ( )
inline

Creates the Complex sort.

Definition at line 169 of file Context.java.

170 {
171 return new ComplexSort(this);
172 }

◆ mkConcat() [1/3]

BitVecExpr mkConcat ( Expr< BitVecSort >  t1,
Expr< BitVecSort >  t2 
)
inline

Bit-vector concatenation. Remarks: The arguments must have a bit-vector sort.

Returns
The result is a bit-vector of size n1+n2, where n1 (n2) is the size of t1 (t2).

Definition at line 1584 of file Context.java.

1585 {
1586 checkContextMatch(t1);
1587 checkContextMatch(t2);
1588 return new BitVecExpr(this, Native.mkConcat(nCtx(),
1589 t1.getNativeObject(), t2.getNativeObject()));
1590 }

◆ mkConcat() [2/3]

final< R extends Sort > SeqExpr< R > mkConcat ( Expr< SeqSort< R > >...  t)
inline

Concatenate sequences.

Definition at line 2432 of file Context.java.

2433 {
2434 checkContextMatch(t);
2435 return (SeqExpr<R>) Expr.create(this, Native.mkSeqConcat(nCtx(), t.length, AST.arrayToNative(t)));
2436 }

◆ mkConcat() [3/3]

final< R extends Sort > ReExpr< R > mkConcat ( ReExpr< R >...  t)
inline

Create the concatenation of regular languages.

Definition at line 2710 of file Context.java.

2711 {
2712 checkContextMatch(t);
2713 return (ReExpr<R>) Expr.create(this, Native.mkReConcat(nCtx(), t.length, AST.arrayToNative(t)));
2714 }

◆ mkConst() [1/3]

final< R extends Sort > Expr< R > mkConst ( FuncDecl< R >  f)
inline

Creates a fresh constant from the FuncDecl f.

Parameters
fA decl of a 0-arity function

Definition at line 787 of file Context.java.

788 {
789 return mkApp(f, (Expr<?>[]) null);
790 }
final< R extends Sort > Expr< R > mkApp(FuncDecl< R > f, Expr<?>... args)
Definition Context.java:894

◆ mkConst() [2/3]

final< R extends Sort > Expr< R > mkConst ( String  name,
R  range 
)
inline

Creates a new Constant of sort range and named name.

Definition at line 767 of file Context.java.

768 {
769 return mkConst(mkSymbol(name), range);
770 }

◆ mkConst() [3/3]

final< R extends Sort > Expr< R > mkConst ( Symbol  name,
R  range 
)
inline

Creates a new Constant of sort range and named name.

Definition at line 752 of file Context.java.

753 {
754 checkContextMatch(name);
755 checkContextMatch(range);
756
757 return (Expr<R>) Expr.create(
758 this,
759 Native.mkConst(nCtx(), name.getNativeObject(),
760 range.getNativeObject()));
761 }
expr range(expr const &lo, expr const &hi)
Definition z3++.h:4631

◆ mkConstArray()

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkConstArray ( D  domain,
Expr< R >  v 
)
inline

Create a constant array. Remarks: The resulting term is an array, such that a select on an arbitrary index produces the value v.

See also
Context::mkArraySort
Context::mkSelect

Definition at line 2027 of file Context.java.

2028 {
2029 checkContextMatch(domain);
2030 checkContextMatch(v);
2031 return new ArrayExpr<>(this, Native.mkConstArray(nCtx(),
2032 domain.getNativeObject(), v.getNativeObject()));
2033 }

◆ mkConstDecl() [1/2]

final< R extends Sort > FuncDecl< R > mkConstDecl ( String  name,
R  range 
)
inline

Creates a new constant function declaration.

Definition at line 705 of file Context.java.

706 {
707 checkContextMatch(range);
708 return new FuncDecl<>(this, mkSymbol(name), null, range);
709 }

◆ mkConstDecl() [2/2]

final< R extends Sort > FuncDecl< R > mkConstDecl ( Symbol  name,
R  range 
)
inline

Creates a new constant function declaration.

Definition at line 695 of file Context.java.

696 {
697 checkContextMatch(name);
698 checkContextMatch(range);
699 return new FuncDecl<>(this, name, null, range);
700 }

◆ mkConstructor() [1/2]

final< R > Constructor< R > mkConstructor ( String  name,
String  recognizer,
String[]  fieldNames,
Sort[]  sorts,
int[]  sortRefs 
)
inline

Create a datatype constructor.

Definition at line 381 of file Context.java.

383 {
384 return of(this, mkSymbol(name), mkSymbol(recognizer), mkSymbols(fieldNames), sorts, sortRefs);
385 }

◆ mkConstructor() [2/2]

final< R > Constructor< R > mkConstructor ( Symbol  name,
Symbol  recognizer,
Symbol[]  fieldNames,
Sort[]  sorts,
int[]  sortRefs 
)
inline

Create a datatype constructor.

Parameters
nameconstructor name
recognizername of recognizer function.
fieldNamesnames of the constructor fields.
sortsfield sorts, 0 if the field sort refers to a recursive sort.
sortRefsreference 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.

Definition at line 371 of file Context.java.

374 {
375 return of(this, name, recognizer, fieldNames, sorts, sortRefs);
376 }

◆ mkContains()

final< R extends Sort > BoolExpr mkContains ( Expr< SeqSort< R > >  s1,
Expr< SeqSort< R > >  s2 
)
inline

Check for sequence containment of s2 in s1.

Definition at line 2478 of file Context.java.

2479 {
2480 checkContextMatch(s1, s2);
2481 return (BoolExpr) Expr.create(this, Native.mkSeqContains(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2482 }

◆ mkDatatypeSort() [1/2]

final< R > DatatypeSort< R > mkDatatypeSort ( String  name,
Constructor< R >[]  constructors 
)
inline

Create a new datatype sort.

Definition at line 400 of file Context.java.

402 {
403 checkContextMatch(constructors);
404 return new DatatypeSort<>(this, mkSymbol(name), constructors);
405 }

◆ mkDatatypeSort() [2/2]

final< R > DatatypeSort< R > mkDatatypeSort ( Symbol  name,
Constructor< R >[]  constructors 
)
inline

Create a new datatype sort.

Definition at line 390 of file Context.java.

391 {
392 checkContextMatch(name);
393 checkContextMatch(constructors);
394 return new DatatypeSort<>(this, name, constructors);
395 }

◆ mkDatatypeSorts() [1/2]

DatatypeSort< Object >[] mkDatatypeSorts ( String[]  names,
Constructor< Object >  c[][] 
)
inline

Create mutually recursive data-types.

Definition at line 486 of file Context.java.

488 {
489 return mkDatatypeSorts(mkSymbols(names), c);
490 }
DatatypeSort< Object >[] mkDatatypeSorts(Symbol[] names, Constructor< Object >[][] c)
Definition Context.java:460

◆ mkDatatypeSorts() [2/2]

DatatypeSort< Object >[] mkDatatypeSorts ( Symbol[]  names,
Constructor< Object >  c[][] 
)
inline

Create mutually recursive datatypes.

Parameters
namesnames of datatype sorts
clist of constructors, one list per sort.

Definition at line 460 of file Context.java.

461 {
462 checkContextMatch(names);
463 int n = names.length;
464 ConstructorList<Object>[] cla = new ConstructorList[n];
465 long[] n_constr = new long[n];
466 for (int i = 0; i < n; i++)
467 {
468 Constructor<Object>[] constructor = c[i];
469
470 checkContextMatch(constructor);
471 cla[i] = new ConstructorList<>(this, constructor);
472 n_constr[i] = cla[i].getNativeObject();
473 }
474 long[] n_res = new long[n];
475 Native.mkDatatypes(nCtx(), n, Symbol.arrayToNative(names), n_res,
476 n_constr);
477 DatatypeSort<Object>[] res = new DatatypeSort[n];
478 for (int i = 0; i < n; i++)
479 res[i] = new DatatypeSort<>(this, n_res[i]);
480 return res;
481 }
DatatypeSort(name, params=None, ctx=None)
Definition z3py.py:6067

◆ mkDiff()

final< R extends Sort > ReExpr< R > mkDiff ( Expr< ReSort< R > >  a,
Expr< ReSort< R > >  b 
)
inline

Create a difference regular expression.

Definition at line 2739 of file Context.java.

2740 {
2741 checkContextMatch(a, b);
2742 return (ReExpr<R>) Expr.create(this, Native.mkReDiff(nCtx(), a.getNativeObject(), b.getNativeObject()));
2743 }

◆ mkDistinct()

final BoolExpr mkDistinct ( Expr<?>...  args)
inline

Creates a distinct term.

Definition at line 940 of file Context.java.

941 {
942 checkContextMatch(args);
943 return new BoolExpr(this, Native.mkDistinct(nCtx(), args.length,
944 AST.arrayToNative(args)));
945 }

◆ mkDiv()

final< R extends ArithSort > ArithExpr< R > mkDiv ( Expr<? extends R >  t1,
Expr<? extends R >  t2 
)
inline

Create an expression representing t1 / t2.

Definition at line 1073 of file Context.java.

1074 {
1075 checkContextMatch(t1);
1076 checkContextMatch(t2);
1077 return (ArithExpr<R>) Expr.create(this, Native.mkDiv(nCtx(),
1078 t1.getNativeObject(), t2.getNativeObject()));
1079 }

◆ mkDivides()

BoolExpr mkDivides ( Expr< IntSort >  t1,
Expr< IntSort >  t2 
)
inline

Creates an integer divisibility predicate (t1 divides t2). Remarks: Both arguments must have integer sort.

Definition at line 1217 of file Context.java.

1218 {
1219 checkContextMatch(t1);
1220 checkContextMatch(t2);
1221 return new BoolExpr(this, Native.mkDivides(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
1222 }

◆ mkEmptyRe()

final< R extends Sort > ReExpr< R > mkEmptyRe ( ReSort< R >  s)
inline

Create the empty regular expression. Corresponds to re.none

Definition at line 2750 of file Context.java.

2751 {
2752 return (ReExpr<R>) Expr.create(this, Native.mkReEmpty(nCtx(), s.getNativeObject()));
2753 }

◆ mkEmptySeq()

final< R extends Sort > SeqExpr< R > mkEmptySeq ( R  s)
inline

Sequences, Strings and regular expressions. Create the empty sequence.

Definition at line 2365 of file Context.java.

2366 {
2367 checkContextMatch(s);
2368 return (SeqExpr<R>) Expr.create(this, Native.mkSeqEmpty(nCtx(), s.getNativeObject()));
2369 }

◆ mkEmptySet()

final< D extends Sort > ArrayExpr< D, BoolSort > mkEmptySet ( D  domain)
inline

Create an empty set.

Definition at line 2107 of file Context.java.

2108 {
2109 checkContextMatch(domain);
2110 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2111 Native.mkEmptySet(nCtx(), domain.getNativeObject()));
2112 }

◆ mkEnumSort() [1/2]

final< R > EnumSort< R > mkEnumSort ( String  name,
String...  enumNames 
)
inline

Create a new enumeration sort.

Definition at line 316 of file Context.java.

318 {
319 return new EnumSort<>(this, mkSymbol(name), mkSymbols(enumNames));
320 }

◆ mkEnumSort() [2/2]

final< R > EnumSort< R > mkEnumSort ( Symbol  name,
Symbol...  enumNames 
)
inline

Create a new enumeration sort.

Definition at line 305 of file Context.java.

307 {
308 checkContextMatch(name);
309 checkContextMatch(enumNames);
310 return new EnumSort<>(this, name, enumNames);
311 }

◆ mkEq()

BoolExpr mkEq ( Expr<?>  x,
Expr<?>  y 
)
inline

Creates the equality x = y

Definition at line 928 of file Context.java.

929 {
930 checkContextMatch(x);
931 checkContextMatch(y);
932 return new BoolExpr(this, Native.mkEq(nCtx(), x.getNativeObject(),
933 y.getNativeObject()));
934 }

◆ mkExists() [1/2]

Quantifier mkExists ( Expr<?>[]  boundConstants,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Creates an existential quantifier using a list of constants that will form the set of bound variables.

See also
Context::mkForall

Definition at line 3112 of file Context.java.

3115 {
3116
3117 return Quantifier.of(this, false, boundConstants, body, weight,
3118 patterns, noPatterns, quantifierID, skolemID);
3119 }

◆ mkExists() [2/2]

Quantifier mkExists ( Sort[]  sorts,
Symbol[]  names,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Creates an existential quantifier using de-Bruijn indexed variables.

See also
Context::mkForall

Definition at line 3099 of file Context.java.

3102 {
3103
3104 return Quantifier.of(this, false, sorts, names, body, weight,
3105 patterns, noPatterns, quantifierID, skolemID);
3106 }

◆ mkExtract() [1/2]

final< R extends Sort > SeqExpr< R > mkExtract ( Expr< SeqSort< R > >  s,
Expr< IntSort >  offset,
Expr< IntSort >  length 
)
inline

Extract subsequence.

Definition at line 2526 of file Context.java.

2527 {
2528 checkContextMatch(s, offset, length);
2529 return (SeqExpr<R>) Expr.create(this, Native.mkSeqExtract(nCtx(), s.getNativeObject(), offset.getNativeObject(), length.getNativeObject()));
2530 }

◆ mkExtract() [2/2]

BitVecExpr mkExtract ( int  high,
int  low,
Expr< BitVecSort >  t 
)
inline

Bit-vector extraction. Remarks: Extract the bits 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.

Definition at line 1600 of file Context.java.

1602 {
1603 checkContextMatch(t);
1604 return new BitVecExpr(this, Native.mkExtract(nCtx(), high, low,
1605 t.getNativeObject()));
1606 }

◆ mkFalse()

BoolExpr mkFalse ( )
inline

The false Term.

Definition at line 912 of file Context.java.

913 {
914 return new BoolExpr(this, Native.mkFalse(nCtx()));
915 }

◆ mkFiniteDomainSort() [1/2]

final< R > FiniteDomainSort< R > mkFiniteDomainSort ( String  name,
long  size 
)
inline

Create a new finite domain sort.

Definition at line 354 of file Context.java.

356 {
357 return new FiniteDomainSort<>(this, mkSymbol(name), size);
358 }

◆ mkFiniteDomainSort() [2/2]

final< R > FiniteDomainSort< R > mkFiniteDomainSort ( Symbol  name,
long  size 
)
inline

Create a new finite domain sort.

Definition at line 344 of file Context.java.

346 {
347 checkContextMatch(name);
348 return new FiniteDomainSort<>(this, name, size);
349 }

◆ mkFiniteSetDifference()

final Expr mkFiniteSetDifference ( Expr  s1,
Expr  s2 
)
inline

Create the difference of two finite sets.

Definition at line 2291 of file Context.java.

2292 {
2293 checkContextMatch(s1);
2294 checkContextMatch(s2);
2295 return Expr.create(this, Native.mkFiniteSetDifference(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2296 }

◆ mkFiniteSetEmpty()

final Expr mkFiniteSetEmpty ( Sort  setSort)
inline

Create an empty finite set.

Definition at line 2253 of file Context.java.

2254 {
2255 checkContextMatch(setSort);
2256 return Expr.create(this, Native.mkFiniteSetEmpty(nCtx(), setSort.getNativeObject()));
2257 }

◆ mkFiniteSetFilter()

final Expr mkFiniteSetFilter ( Expr  f,
Expr  set 
)
inline

Filter a finite set with a predicate.

Definition at line 2340 of file Context.java.

2341 {
2342 checkContextMatch(f);
2343 checkContextMatch(set);
2344 return Expr.create(this, Native.mkFiniteSetFilter(nCtx(), f.getNativeObject(), set.getNativeObject()));
2345 }

◆ mkFiniteSetIntersect()

final Expr mkFiniteSetIntersect ( Expr  s1,
Expr  s2 
)
inline

Create the intersection of two finite sets.

Definition at line 2281 of file Context.java.

2282 {
2283 checkContextMatch(s1);
2284 checkContextMatch(s2);
2285 return Expr.create(this, Native.mkFiniteSetIntersect(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2286 }

◆ mkFiniteSetMap()

final Expr mkFiniteSetMap ( Expr  f,
Expr  set 
)
inline

Map a function over all elements in a finite set.

Definition at line 2330 of file Context.java.

2331 {
2332 checkContextMatch(f);
2333 checkContextMatch(set);
2334 return Expr.create(this, Native.mkFiniteSetMap(nCtx(), f.getNativeObject(), set.getNativeObject()));
2335 }

◆ mkFiniteSetMember()

final BoolExpr mkFiniteSetMember ( Expr  elem,
Expr  set 
)
inline

Check for membership in a finite set.

Definition at line 2301 of file Context.java.

2302 {
2303 checkContextMatch(elem);
2304 checkContextMatch(set);
2305 return (BoolExpr) Expr.create(this, Native.mkFiniteSetMember(nCtx(), elem.getNativeObject(), set.getNativeObject()));
2306 }

◆ mkFiniteSetRange()

final Expr mkFiniteSetRange ( Expr  low,
Expr  high 
)
inline

Create a finite set containing integers in the range [low, high].

Definition at line 2350 of file Context.java.

2351 {
2352 checkContextMatch(low);
2353 checkContextMatch(high);
2354 return Expr.create(this, Native.mkFiniteSetRange(nCtx(), low.getNativeObject(), high.getNativeObject()));
2355 }

◆ mkFiniteSetSingleton()

final Expr mkFiniteSetSingleton ( Expr  elem)
inline

Create a singleton finite set.

Definition at line 2262 of file Context.java.

2263 {
2264 checkContextMatch(elem);
2265 return Expr.create(this, Native.mkFiniteSetSingleton(nCtx(), elem.getNativeObject()));
2266 }

◆ mkFiniteSetSize()

final Expr mkFiniteSetSize ( Expr  set)
inline

Get the cardinality of a finite set.

Definition at line 2311 of file Context.java.

2312 {
2313 checkContextMatch(set);
2314 return Expr.create(this, Native.mkFiniteSetSize(nCtx(), set.getNativeObject()));
2315 }

◆ mkFiniteSetSort()

final FiniteSetSort mkFiniteSetSort ( Sort  elemSort)
inline

Finite Sets Create a finite set sort over the given element sort.

Definition at line 2226 of file Context.java.

2227 {
2228 checkContextMatch(elemSort);
2229 return new FiniteSetSort(this, elemSort);
2230 }
FiniteSetSort(elem_sort)
Definition z3py.py:5501

◆ mkFiniteSetSubset()

final BoolExpr mkFiniteSetSubset ( Expr  s1,
Expr  s2 
)
inline

Check if one finite set is a subset of another.

Definition at line 2320 of file Context.java.

2321 {
2322 checkContextMatch(s1);
2323 checkContextMatch(s2);
2324 return (BoolExpr) Expr.create(this, Native.mkFiniteSetSubset(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2325 }

◆ mkFiniteSetUnion()

final Expr mkFiniteSetUnion ( Expr  s1,
Expr  s2 
)
inline

Create the union of two finite sets.

Definition at line 2271 of file Context.java.

2272 {
2273 checkContextMatch(s1);
2274 checkContextMatch(s2);
2275 return Expr.create(this, Native.mkFiniteSetUnion(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2276 }

◆ mkFixedpoint()

Fixedpoint mkFixedpoint ( )
inline

Create a Fixedpoint context.

Definition at line 3909 of file Context.java.

3910 {
3911 return new Fixedpoint(this);
3912 }

◆ mkForall() [1/2]

Quantifier mkForall ( Expr<?>[]  boundConstants,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Creates a universal quantifier using a list of constants that will form the set of bound variables.

See also
Context::mkForall

Definition at line 3086 of file Context.java.

3089 {
3090
3091 return Quantifier.of(this, true, boundConstants, body, weight,
3092 patterns, noPatterns, quantifierID, skolemID);
3093 }

◆ mkForall() [2/2]

Quantifier mkForall ( Sort[]  sorts,
Symbol[]  names,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Create a universal Quantifier.

Parameters
sortsthe sorts of the bound variables.
namesnames of the bound variables
bodythe body of the quantifier.
weightquantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
patternsarray containing the patterns created using MkPattern.
noPatternsarray containing the anti-patterns created using MkPattern.
quantifierIDoptional symbol to track quantifier.
skolemIDoptional symbol to track skolem constants.
Returns
Creates a forall formula, where 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. 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.
See also
Context::mkBound

Definition at line 3074 of file Context.java.

3077 {
3078 return Quantifier.of(this, true, sorts, names, body, weight, patterns,
3079 noPatterns, quantifierID, skolemID);
3080 }

◆ mkFP() [1/6]

FPNum mkFP ( boolean  sgn,
int  exp,
int  sig,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a sign bit and two integers.

Parameters
sgnthe sign.
expthe exponent.
sigthe significand.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4239 of file Context.java.

4240 {
4241 return mkFPNumeral(sgn, exp, sig, s);
4242 }
FPNum mkFPNumeral(float v, FPSort s)

◆ mkFP() [2/6]

FPNum mkFP ( boolean  sgn,
long  exp,
long  sig,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a sign bit and two 64-bit integers.

Parameters
sgnthe sign.
expthe exponent.
sigthe significand.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4252 of file Context.java.

4253 {
4254 return mkFPNumeral(sgn, exp, sig, s);
4255 }

◆ mkFP() [3/6]

FPNum mkFP ( double  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a double.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4214 of file Context.java.

4215 {
4216 return mkFPNumeral(v, s);
4217 }

◆ mkFP() [4/6]

FPExpr mkFP ( Expr< BitVecSort >  sgn,
Expr< BitVecSort >  sig,
Expr< BitVecSort >  exp 
)
inline

Create an expression of FloatingPoint sort from three bit-vector expressions.

Parameters
sgnbit-vector term (of size 1) representing the sign.
sigbit-vector term representing the significand.
expbit-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.
Exceptions
Z3Exception

Definition at line 4537 of file Context.java.

4538 {
4539 return new FPExpr(this, Native.mkFpaFp(nCtx(), sgn.getNativeObject(), sig.getNativeObject(), exp.getNativeObject()));
4540 }

◆ mkFP() [5/6]

FPNum mkFP ( float  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a float.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4203 of file Context.java.

4204 {
4205 return mkFPNumeral(v, s);
4206 }

◆ mkFP() [6/6]

FPNum mkFP ( int  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from an int.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4226 of file Context.java.

4227 {
4228 return mkFPNumeral(v, s);
4229 }

◆ mkFPAbs()

FPExpr mkFPAbs ( Expr< FPSort >  t)
inline

Floating-point absolute value

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4263 of file Context.java.

4264 {
4265 return new FPExpr(this, Native.mkFpaAbs(nCtx(), t.getNativeObject()));
4266 }

◆ mkFPAdd()

FPExpr mkFPAdd ( Expr< FPRMSort >  rm,
Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point addition

Parameters
rmrounding mode term
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4285 of file Context.java.

4286 {
4287 return new FPExpr(this, Native.mkFpaAdd(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4288 }

◆ mkFPDiv()

FPExpr mkFPDiv ( Expr< FPRMSort >  rm,
Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point division

Parameters
rmrounding mode term
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4321 of file Context.java.

4322 {
4323 return new FPExpr(this, Native.mkFpaDiv(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4324 }

◆ mkFPEq()

BoolExpr mkFPEq ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point equality.

Parameters
t1floating-point term
t2floating-point term Remarks: Note that this is IEEE 754 equality (as opposed to standard =).
Exceptions
Z3Exception

Definition at line 4449 of file Context.java.

4450 {
4451 return new BoolExpr(this, Native.mkFpaEq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4452 }

◆ mkFPFMA()

FPExpr mkFPFMA ( Expr< FPRMSort >  rm,
Expr< FPSort >  t1,
Expr< FPSort >  t2,
Expr< FPSort >  t3 
)
inline

Floating-point fused multiply-add

Parameters
rmrounding mode term
t1floating-point term
t2floating-point term
t3floating-point term Remarks: The result is round((t1 * t2) + t3)
Exceptions
Z3Exception

Definition at line 4336 of file Context.java.

4337 {
4338 return new FPExpr(this, Native.mkFpaFma(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject(), t3.getNativeObject()));
4339 }

◆ mkFPGEq()

BoolExpr mkFPGEq ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point greater than or equal.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4425 of file Context.java.

4426 {
4427 return new BoolExpr(this, Native.mkFpaGeq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4428 }

◆ mkFPGt()

BoolExpr mkFPGt ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point greater than.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4436 of file Context.java.

4437 {
4438 return new BoolExpr(this, Native.mkFpaGt(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4439 }

◆ mkFPInf()

FPNum mkFPInf ( FPSort  s,
boolean  negative 
)
inline

Create a floating-point infinity of sort s.

Parameters
sFloatingPoint sort.
negativeindicates whether the result should be negative.
Exceptions
Z3Exception

Definition at line 4122 of file Context.java.

4123 {
4124 return new FPNum(this, Native.mkFpaInf(nCtx(), s.getNativeObject(), negative));
4125 }

◆ mkFPIsInfinite()

BoolExpr mkFPIsInfinite ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a floating-point number representing +oo or -oo.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4489 of file Context.java.

4490 {
4491 return new BoolExpr(this, Native.mkFpaIsInfinite(nCtx(), t.getNativeObject()));
4492 }

◆ mkFPIsNaN()

BoolExpr mkFPIsNaN ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a NaN.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4499 of file Context.java.

4500 {
4501 return new BoolExpr(this, Native.mkFpaIsNan(nCtx(), t.getNativeObject()));
4502 }

◆ mkFPIsNegative()

BoolExpr mkFPIsNegative ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a negative floating-point number.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4509 of file Context.java.

4510 {
4511 return new BoolExpr(this, Native.mkFpaIsNegative(nCtx(), t.getNativeObject()));
4512 }

◆ mkFPIsNormal()

BoolExpr mkFPIsNormal ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a normal floating-point number.\

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4459 of file Context.java.

4460 {
4461 return new BoolExpr(this, Native.mkFpaIsNormal(nCtx(), t.getNativeObject()));
4462 }

◆ mkFPIsPositive()

BoolExpr mkFPIsPositive ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a positive floating-point number.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4519 of file Context.java.

4520 {
4521 return new BoolExpr(this, Native.mkFpaIsPositive(nCtx(), t.getNativeObject()));
4522 }

◆ mkFPIsSubnormal()

BoolExpr mkFPIsSubnormal ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a subnormal floating-point number.\

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4469 of file Context.java.

4470 {
4471 return new BoolExpr(this, Native.mkFpaIsSubnormal(nCtx(), t.getNativeObject()));
4472 }

◆ mkFPIsZero()

BoolExpr mkFPIsZero ( Expr< FPSort >  t)
inline

Predicate indicating whether t is a floating-point number with zero value, i.e., +0 or -0.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4479 of file Context.java.

4480 {
4481 return new BoolExpr(this, Native.mkFpaIsZero(nCtx(), t.getNativeObject()));
4482 }

◆ mkFPLEq()

BoolExpr mkFPLEq ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point less than or equal.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4403 of file Context.java.

4404 {
4405 return new BoolExpr(this, Native.mkFpaLeq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4406 }

◆ mkFPLt()

BoolExpr mkFPLt ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point less than.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4414 of file Context.java.

4415 {
4416 return new BoolExpr(this, Native.mkFpaLt(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4417 }

◆ mkFPMax()

FPExpr mkFPMax ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Maximum of floating-point numbers.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4392 of file Context.java.

4393 {
4394 return new FPExpr(this, Native.mkFpaMax(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4395 }

◆ mkFPMin()

FPExpr mkFPMin ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Minimum of floating-point numbers.

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4381 of file Context.java.

4382 {
4383 return new FPExpr(this, Native.mkFpaMin(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4384 }

◆ mkFPMul()

FPExpr mkFPMul ( Expr< FPRMSort >  rm,
Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point multiplication

Parameters
rmrounding mode term
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4309 of file Context.java.

4310 {
4311 return new FPExpr(this, Native.mkFpaMul(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4312 }

◆ mkFPNaN()

FPNum mkFPNaN ( FPSort  s)
inline

Create a NaN of sort s.

Parameters
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4111 of file Context.java.

4112 {
4113 return new FPNum(this, Native.mkFpaNan(nCtx(), s.getNativeObject()));
4114 }

◆ mkFPNeg()

FPExpr mkFPNeg ( Expr< FPSort >  t)
inline

Floating-point negation

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4273 of file Context.java.

4274 {
4275 return new FPExpr(this, Native.mkFpaNeg(nCtx(), t.getNativeObject()));
4276 }

◆ mkFPNumeral() [1/5]

FPNum mkFPNumeral ( boolean  sgn,
int  exp,
int  sig,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a sign bit and two integers.

Parameters
sgnthe sign.
expthe exponent.
sigthe significand.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4179 of file Context.java.

4180 {
4181 return new FPNum(this, Native.mkFpaNumeralIntUint(nCtx(), sgn, exp, sig, s.getNativeObject()));
4182 }

◆ mkFPNumeral() [2/5]

FPNum mkFPNumeral ( boolean  sgn,
long  exp,
long  sig,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a sign bit and two 64-bit integers.

Parameters
sgnthe sign.
expthe exponent.
sigthe significand.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4192 of file Context.java.

4193 {
4194 return new FPNum(this, Native.mkFpaNumeralInt64Uint64(nCtx(), sgn, exp, sig, s.getNativeObject()));
4195 }

◆ mkFPNumeral() [3/5]

FPNum mkFPNumeral ( double  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a double.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4155 of file Context.java.

4156 {
4157 return new FPNum(this, Native.mkFpaNumeralDouble(nCtx(), v, s.getNativeObject()));
4158 }

◆ mkFPNumeral() [4/5]

FPNum mkFPNumeral ( float  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from a float.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4144 of file Context.java.

4145 {
4146 return new FPNum(this, Native.mkFpaNumeralFloat(nCtx(), v, s.getNativeObject()));
4147 }

◆ mkFPNumeral() [5/5]

FPNum mkFPNumeral ( int  v,
FPSort  s 
)
inline

Create a numeral of FloatingPoint sort from an int.

Parameters
vnumeral value.
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4166 of file Context.java.

4167 {
4168 return new FPNum(this, Native.mkFpaNumeralInt(nCtx(), v, s.getNativeObject()));
4169 }

◆ mkFPRem()

FPExpr mkFPRem ( Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point remainder

Parameters
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4358 of file Context.java.

4359 {
4360 return new FPExpr(this, Native.mkFpaRem(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4361 }

◆ mkFPRNA()

FPRMNum mkFPRNA ( )
inline

Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.

Exceptions
Z3Exception

Definition at line 3963 of file Context.java.

3964 {
3965 return new FPRMNum(this, Native.mkFpaRna(nCtx()));
3966 }

◆ mkFPRNE()

FPRMNum mkFPRNE ( )
inline

Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.

Exceptions
Z3Exception

Definition at line 3945 of file Context.java.

3946 {
3947 return new FPRMNum(this, Native.mkFpaRne(nCtx()));
3948 }

◆ mkFPRoundingModeSort()

FPRMSort mkFPRoundingModeSort ( )
inline

Create the floating-point RoundingMode sort.

Exceptions
Z3Exception

Definition at line 3927 of file Context.java.

3928 {
3929 return new FPRMSort(this);
3930 }

◆ mkFPRoundNearestTiesToAway()

FPRMNum mkFPRoundNearestTiesToAway ( )
inline

Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.

Exceptions
Z3Exception

Definition at line 3954 of file Context.java.

3955 {
3956 return new FPRMNum(this, Native.mkFpaRoundNearestTiesToAway(nCtx()));
3957 }

◆ mkFPRoundNearestTiesToEven()

FPRMExpr mkFPRoundNearestTiesToEven ( )
inline

Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.

Exceptions
Z3Exception

Definition at line 3936 of file Context.java.

3937 {
3938 return new FPRMExpr(this, Native.mkFpaRoundNearestTiesToEven(nCtx()));
3939 }

◆ mkFPRoundToIntegral()

FPExpr mkFPRoundToIntegral ( Expr< FPRMSort >  rm,
Expr< FPSort >  t 
)
inline

Floating-point roundToIntegral. Rounds a floating-point number to the closest integer, again represented as a floating-point number.

Parameters
rmterm of RoundingMode sort
tfloating-point term
Exceptions
Z3Exception

Definition at line 4370 of file Context.java.

4371 {
4372 return new FPExpr(this, Native.mkFpaRoundToIntegral(nCtx(), rm.getNativeObject(), t.getNativeObject()));
4373 }

◆ mkFPRoundTowardNegative()

FPRMNum mkFPRoundTowardNegative ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardNegative rounding mode.

Exceptions
Z3Exception

Definition at line 3990 of file Context.java.

3991 {
3992 return new FPRMNum(this, Native.mkFpaRoundTowardNegative(nCtx()));
3993 }

◆ mkFPRoundTowardPositive()

FPRMNum mkFPRoundTowardPositive ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardPositive rounding mode.

Exceptions
Z3Exception

Definition at line 3972 of file Context.java.

3973 {
3974 return new FPRMNum(this, Native.mkFpaRoundTowardPositive(nCtx()));
3975 }

◆ mkFPRoundTowardZero()

FPRMNum mkFPRoundTowardZero ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardZero rounding mode.

Exceptions
Z3Exception

Definition at line 4008 of file Context.java.

4009 {
4010 return new FPRMNum(this, Native.mkFpaRoundTowardZero(nCtx()));
4011 }

◆ mkFPRTN()

FPRMNum mkFPRTN ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardNegative rounding mode.

Exceptions
Z3Exception

Definition at line 3999 of file Context.java.

4000 {
4001 return new FPRMNum(this, Native.mkFpaRtn(nCtx()));
4002 }

◆ mkFPRTP()

FPRMNum mkFPRTP ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardPositive rounding mode.

Exceptions
Z3Exception

Definition at line 3981 of file Context.java.

3982 {
3983 return new FPRMNum(this, Native.mkFpaRtp(nCtx()));
3984 }

◆ mkFPRTZ()

FPRMNum mkFPRTZ ( )
inline

Create a numeral of RoundingMode sort which represents the RoundTowardZero rounding mode.

Exceptions
Z3Exception

Definition at line 4017 of file Context.java.

4018 {
4019 return new FPRMNum(this, Native.mkFpaRtz(nCtx()));
4020 }

◆ mkFPSort()

FPSort mkFPSort ( int  ebits,
int  sbits 
)
inline

Create a FloatingPoint sort.

Parameters
ebitsexponent bits in the FloatingPoint sort.
sbitssignificand bits in the FloatingPoint sort.
Exceptions
Z3Exception

Definition at line 4028 of file Context.java.

4029 {
4030 return new FPSort(this, ebits, sbits);
4031 }
FPSort(ebits, sbits, ctx=None)
Definition z3py.py:10867

◆ mkFPSort128()

FPSort mkFPSort128 ( )
inline

Create the quadruple-precision (128-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4100 of file Context.java.

4101 {
4102 return new FPSort(this, Native.mkFpaSort128(nCtx()));
4103 }

◆ mkFPSort16()

FPSort mkFPSort16 ( )
inline

Create the half-precision (16-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4046 of file Context.java.

4047 {
4048 return new FPSort(this, Native.mkFpaSort16(nCtx()));
4049 }

◆ mkFPSort32()

FPSort mkFPSort32 ( )
inline

Create the single-precision (32-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4064 of file Context.java.

4065 {
4066 return new FPSort(this, Native.mkFpaSort32(nCtx()));
4067 }

◆ mkFPSort64()

FPSort mkFPSort64 ( )
inline

Create the double-precision (64-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4082 of file Context.java.

4083 {
4084 return new FPSort(this, Native.mkFpaSort64(nCtx()));
4085 }

◆ mkFPSortDouble()

FPSort mkFPSortDouble ( )
inline

Create the double-precision (64-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4073 of file Context.java.

4074 {
4075 return new FPSort(this, Native.mkFpaSortDouble(nCtx()));
4076 }

◆ mkFPSortHalf()

FPSort mkFPSortHalf ( )
inline

Create the half-precision (16-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4037 of file Context.java.

4038 {
4039 return new FPSort(this, Native.mkFpaSortHalf(nCtx()));
4040 }

◆ mkFPSortQuadruple()

FPSort mkFPSortQuadruple ( )
inline

Create the quadruple-precision (128-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4091 of file Context.java.

4092 {
4093 return new FPSort(this, Native.mkFpaSortQuadruple(nCtx()));
4094 }

◆ mkFPSortSingle()

FPSort mkFPSortSingle ( )
inline

Create the single-precision (32-bit) FloatingPoint sort.

Exceptions
Z3Exception

Definition at line 4055 of file Context.java.

4056 {
4057 return new FPSort(this, Native.mkFpaSortSingle(nCtx()));
4058 }

◆ mkFPSqrt()

FPExpr mkFPSqrt ( Expr< FPRMSort >  rm,
Expr< FPSort >  t 
)
inline

Floating-point square root

Parameters
rmrounding mode term
tfloating-point term
Exceptions
Z3Exception

Definition at line 4347 of file Context.java.

4348 {
4349 return new FPExpr(this, Native.mkFpaSqrt(nCtx(), rm.getNativeObject(), t.getNativeObject()));
4350 }

◆ mkFPSub()

FPExpr mkFPSub ( Expr< FPRMSort >  rm,
Expr< FPSort >  t1,
Expr< FPSort >  t2 
)
inline

Floating-point subtraction

Parameters
rmrounding mode term
t1floating-point term
t2floating-point term
Exceptions
Z3Exception

Definition at line 4297 of file Context.java.

4298 {
4299 return new FPExpr(this, Native.mkFpaSub(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4300 }

◆ mkFPToBV()

BitVecExpr mkFPToBV ( Expr< FPRMSort >  rm,
Expr< FPSort >  t,
int  sz,
boolean  isSigned 
)
inline

Conversion of a floating-point term into a bit-vector.

Parameters
rmRoundingMode term.
tFloatingPoint term
szSize of the resulting bit-vector.
isSignedIndicates 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 isSigned==true). If necessary, the result will be rounded according to rounding mode rm.
Exceptions
Z3Exception

Definition at line 4638 of file Context.java.

4639 {
4640 if (isSigned)
4641 return new BitVecExpr(this, Native.mkFpaToSbv(nCtx(), rm.getNativeObject(), t.getNativeObject(), sz));
4642 else
4643 return new BitVecExpr(this, Native.mkFpaToUbv(nCtx(), rm.getNativeObject(), t.getNativeObject(), sz));
4644 }

◆ mkFPToFP() [1/6]

FPExpr mkFPToFP ( Expr< BitVecSort >  bv,
FPSort  s 
)
inline

Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.

Parameters
bvbit-vector value (of size m).
sFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4553 of file Context.java.

4554 {
4555 return new FPExpr(this, Native.mkFpaToFpBv(nCtx(), bv.getNativeObject(), s.getNativeObject()));
4556 }

◆ mkFPToFP() [2/6]

FPExpr mkFPToFP ( Expr< FPRMSort >  rm,
Expr< BitVecSort >  t,
FPSort  s,
boolean  isSigned 
)
inline

Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.

Parameters
rmRoundingMode term.
tterm of bit-vector sort.
sFloatingPoint sort.
isSignedflag 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 isSigned==true, otherwise unsigned). If necessary, the result will be rounded according to rounding mode rm.
Exceptions
Z3Exception

Definition at line 4603 of file Context.java.

4604 {
4605 if (isSigned)
4606 return new FPExpr(this, Native.mkFpaToFpSigned(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4607 else
4608 return new FPExpr(this, Native.mkFpaToFpUnsigned(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4609 }

◆ mkFPToFP() [3/6]

BitVecExpr mkFPToFP ( Expr< FPRMSort >  rm,
Expr< IntSort >  exp,
Expr< RealSort >  sig,
FPSort  s 
)
inline

Conversion of a real-sorted significand and an integer-sorted exponent into a term of FloatingPoint sort.

Parameters
rmRoundingMode term.
expExponent term of Int sort.
sigSignificand term of Real sort.
sFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4688 of file Context.java.

4689 {
4690 return new BitVecExpr(this, Native.mkFpaToFpIntReal(nCtx(), rm.getNativeObject(), exp.getNativeObject(), sig.getNativeObject(), s.getNativeObject()));
4691 }

◆ mkFPToFP() [4/6]

FPExpr mkFPToFP ( Expr< FPRMSort >  rm,
FPExpr  t,
FPSort  s 
)
inline

Conversion of a FloatingPoint term into another term of different FloatingPoint sort.

Parameters
rmRoundingMode term.
tFloatingPoint term.
sFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4569 of file Context.java.

4570 {
4571 return new FPExpr(this, Native.mkFpaToFpFloat(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4572 }

◆ mkFPToFP() [5/6]

FPExpr mkFPToFP ( Expr< FPRMSort >  rm,
RealExpr  t,
FPSort  s 
)
inline

Conversion of a term of real sort into a term of FloatingPoint sort.

Parameters
rmRoundingMode term.
tterm of Real sort.
sFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4585 of file Context.java.

4586 {
4587 return new FPExpr(this, Native.mkFpaToFpReal(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4588 }

◆ mkFPToFP() [6/6]

FPExpr mkFPToFP ( FPSort  s,
Expr< FPRMSort >  rm,
Expr< FPSort >  t 
)
inline

Conversion of a floating-point number to another FloatingPoint sort s.

Parameters
sFloatingPoint sort
rmfloating-point rounding mode term
tfloating-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.
Exceptions
Z3Exception

Definition at line 4621 of file Context.java.

4622 {
4623 return new FPExpr(this, Native.mkFpaToFpFloat(nCtx(), s.getNativeObject(), rm.getNativeObject(), t.getNativeObject()));
4624 }

◆ mkFPToIEEEBV()

BitVecExpr mkFPToIEEEBV ( Expr< FPSort >  t)
inline

Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.

Parameters
tFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4670 of file Context.java.

4671 {
4672 return new BitVecExpr(this, Native.mkFpaToIeeeBv(nCtx(), t.getNativeObject()));
4673 }

◆ mkFPToReal()

RealExpr mkFPToReal ( Expr< FPSort >  t)
inline

Conversion of a floating-point term into a real-numbered term.

Parameters
tFloatingPoint 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.
Exceptions
Z3Exception

Definition at line 4655 of file Context.java.

4656 {
4657 return new RealExpr(this, Native.mkFpaToReal(nCtx(), t.getNativeObject()));
4658 }

◆ mkFPZero()

FPNum mkFPZero ( FPSort  s,
boolean  negative 
)
inline

Create a floating-point zero of sort s.

Parameters
sFloatingPoint sort.
negativeindicates whether the result should be negative.
Exceptions
Z3Exception

Definition at line 4133 of file Context.java.

4134 {
4135 return new FPNum(this, Native.mkFpaZero(nCtx(), s.getNativeObject(), negative));
4136 }

◆ mkFreshConst()

final< R extends Sort > Expr< R > mkFreshConst ( String  prefix,
R  range 
)
inline

Creates a fresh Constant of sort range and a name prefixed with prefix.

Definition at line 776 of file Context.java.

777 {
778 checkContextMatch(range);
779 return (Expr<R>) Expr.create(this,
780 Native.mkFreshConst(nCtx(), prefix, range.getNativeObject()));
781 }

◆ mkFreshConstDecl()

final< R extends Sort > FuncDecl< R > mkFreshConstDecl ( String  prefix,
R  range 
)
inline

Creates a fresh constant function declaration with a name prefixed with prefix.

See also
Context::mkFuncDecl

Definition at line 716 of file Context.java.

718 {
719 checkContextMatch(range);
720 return new FuncDecl<>(this, prefix, null, range);
721 }

◆ mkFreshFuncDecl()

final< R extends Sort > FuncDecl< R > mkFreshFuncDecl ( String  prefix,
Sort[]  domain,
R  range 
)
inline

Creates a fresh function declaration with a name prefixed with prefix.

See also
Context::mkFuncDecl

Definition at line 684 of file Context.java.

686 {
687 checkContextMatch(domain);
688 checkContextMatch(range);
689 return new FuncDecl<>(this, prefix, domain, range);
690 }

◆ mkFullRe()

final< R extends Sort > ReExpr< R > mkFullRe ( ReSort< R >  s)
inline

Create the full regular expression. Corresponds to re.all

Definition at line 2759 of file Context.java.

2760 {
2761 return (ReExpr<R>) Expr.create(this, Native.mkReFull(nCtx(), s.getNativeObject()));
2762 }

◆ mkFullSet()

final< D extends Sort > ArrayExpr< D, BoolSort > mkFullSet ( D  domain)
inline

Create the full set.

Definition at line 2117 of file Context.java.

2118 {
2119 checkContextMatch(domain);
2120 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2121 Native.mkFullSet(nCtx(), domain.getNativeObject()));
2122 }

◆ mkFuncDecl() [1/4]

final< R extends Sort > FuncDecl< R > mkFuncDecl ( String  name,
Sort  domain,
R  range 
)
inline

Creates a new function declaration.

Definition at line 643 of file Context.java.

645 {
646 checkContextMatch(domain);
647 checkContextMatch(range);
648 Sort[] q = new Sort[] { domain };
649 return new FuncDecl<>(this, mkSymbol(name), q, range);
650 }

◆ mkFuncDecl() [2/4]

final< R extends Sort > FuncDecl< R > mkFuncDecl ( String  name,
Sort[]  domain,
R  range 
)
inline

Creates a new function declaration.

Definition at line 632 of file Context.java.

634 {
635 checkContextMatch(domain);
636 checkContextMatch(range);
637 return new FuncDecl<>(this, mkSymbol(name), domain, range);
638 }

◆ mkFuncDecl() [3/4]

final< R extends Sort > FuncDecl< R > mkFuncDecl ( Symbol  name,
Sort  domain,
R  range 
)
inline

Creates a new function declaration.

Definition at line 619 of file Context.java.

621 {
622 checkContextMatch(name);
623 checkContextMatch(domain);
624 checkContextMatch(range);
625 Sort[] q = new Sort[] { domain };
626 return new FuncDecl<>(this, name, q, range);
627 }

◆ mkFuncDecl() [4/4]

final< R extends Sort > FuncDecl< R > mkFuncDecl ( Symbol  name,
Sort[]  domain,
R  range 
)
inline

Creates a new function declaration.

Definition at line 593 of file Context.java.

594 {
595 checkContextMatch(name);
596 checkContextMatch(domain);
597 checkContextMatch(range);
598 return new FuncDecl<>(this, name, domain, range);
599 }

◆ mkGe()

BoolExpr mkGe ( Expr<? extends ArithSort >  t1,
Expr<? extends ArithSort >  t2 
)
inline

Create an expression representing t1 &gt;= t2

Definition at line 1157 of file Context.java.

1158 {
1159 checkContextMatch(t1);
1160 checkContextMatch(t2);
1161 return new BoolExpr(this, Native.mkGe(nCtx(), t1.getNativeObject(),
1162 t2.getNativeObject()));
1163 }

◆ mkGoal()

Goal mkGoal ( boolean  models,
boolean  unsatCores,
boolean  proofs 
)
inline

Creates a new Goal. Remarks: Note that the Context must have been created with proof generation support if proofs is set to true here.

Parameters
modelsIndicates whether model generation should be enabled.
unsatCoresIndicates whether unsat core generation should be enabled.
proofsIndicates whether proof generation should be enabled.

Definition at line 3290 of file Context.java.

3291 {
3292 return new Goal(this, models, unsatCores, proofs);
3293 }

◆ mkGt()

BoolExpr mkGt ( Expr<? extends ArithSort >  t1,
Expr<? extends ArithSort >  t2 
)
inline

Create an expression representing t1 &gt; t2

Definition at line 1146 of file Context.java.

1147 {
1148 checkContextMatch(t1);
1149 checkContextMatch(t2);
1150 return new BoolExpr(this, Native.mkGt(nCtx(), t1.getNativeObject(),
1151 t2.getNativeObject()));
1152 }

◆ mkIff()

BoolExpr mkIff ( Expr< BoolSort >  t1,
Expr< BoolSort >  t2 
)
inline

Create an expression representing t1 iff t2.

Definition at line 975 of file Context.java.

976 {
977 checkContextMatch(t1);
978 checkContextMatch(t2);
979 return new BoolExpr(this, Native.mkIff(nCtx(), t1.getNativeObject(),
980 t2.getNativeObject()));
981 }

◆ mkImagPart()

RealExpr mkImagPart ( Expr< ComplexSort >  value)
inline

Returns the Real-valued imaginary component of a Complex expression.

Definition at line 868 of file Context.java.

869 {
870 checkContextMatch(value);
871 return new RealExpr(this, Native.mkImagPart(nCtx(), value.getNativeObject()));
872 }

◆ mkImplies()

BoolExpr mkImplies ( Expr< BoolSort >  t1,
Expr< BoolSort >  t2 
)
inline

Create an expression representing t1 -> t2.

Definition at line 986 of file Context.java.

987 {
988 checkContextMatch(t1);
989 checkContextMatch(t2);
990 return new BoolExpr(this, Native.mkImplies(nCtx(),
991 t1.getNativeObject(), t2.getNativeObject()));
992 }

◆ mkIndexOf()

final< R extends Sort > IntExpr mkIndexOf ( Expr< SeqSort< R > >  s,
Expr< SeqSort< R > >  substr,
Expr< IntSort >  offset 
)
inline

Extract index of sub-string starting at offset.

Definition at line 2535 of file Context.java.

2536 {
2537 checkContextMatch(s, substr, offset);
2538 return (IntExpr)Expr.create(this, Native.mkSeqIndex(nCtx(), s.getNativeObject(), substr.getNativeObject(), offset.getNativeObject()));
2539 }

◆ mkInRe()

final< R extends Sort > BoolExpr mkInRe ( Expr< SeqSort< R > >  s,
ReExpr< SeqSort< R > >  re 
)
inline

Check for regular expression membership.

Definition at line 2639 of file Context.java.

2640 {
2641 checkContextMatch(s, re);
2642 return (BoolExpr) Expr.create(this, Native.mkSeqInRe(nCtx(), s.getNativeObject(), re.getNativeObject()));
2643 }

◆ mkInt() [1/3]

IntNum mkInt ( int  v)
inline

Create an integer numeral.

Parameters
vvalue of the numeral.
Returns
A Term with value v and sort Integer

Definition at line 2998 of file Context.java.

2999 {
3000
3001 return new IntNum(this, Native.mkInt(nCtx(), v, getIntSort()
3002 .getNativeObject()));
3003 }

◆ mkInt() [2/3]

IntNum mkInt ( long  v)
inline

Create an integer numeral.

Parameters
vvalue of the numeral.
Returns
A Term with value v and sort Integer

Definition at line 3011 of file Context.java.

3012 {
3013
3014 return new IntNum(this, Native.mkInt64(nCtx(), v, getIntSort()
3015 .getNativeObject()));
3016 }

◆ mkInt() [3/3]

IntNum mkInt ( String  v)
inline

Create an integer numeral.

Parameters
vA string representing the Term value in decimal notation.

Definition at line 2985 of file Context.java.

2986 {
2987
2988 return new IntNum(this, Native.mkNumeral(nCtx(), v, getIntSort()
2989 .getNativeObject()));
2990 }

◆ mkInt2BV()

BitVecExpr mkInt2BV ( int  n,
Expr< IntSort >  t 
)
inline

Create an 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.

Definition at line 1769 of file Context.java.

1770 {
1771 checkContextMatch(t);
1772 return new BitVecExpr(this, Native.mkInt2bv(nCtx(), n,
1773 t.getNativeObject()));
1774 }

◆ mkInt2Real()

RealExpr mkInt2Real ( Expr< IntSort >  t)
inline

Coerce an integer to a real. Remarks: There is also a converse operation exposed. It follows the semantics prescribed by the SMT-LIB standard.

You can take the floor of a real by creating an auxiliary integer Term k and asserting MakeInt2Real(k) &lt;= t1 &lt; MkInt2Real(k)+1. The argument must be of integer sort.

Definition at line 1175 of file Context.java.

1176 {
1177 checkContextMatch(t);
1178 return new RealExpr(this,
1179 Native.mkInt2real(nCtx(), t.getNativeObject()));
1180 }

◆ mkIntConst() [1/2]

IntExpr mkIntConst ( String  name)
inline

Creates an integer constant.

Definition at line 819 of file Context.java.

820 {
821 return (IntExpr) mkConst(name, getIntSort());
822 }

◆ mkIntConst() [2/2]

IntExpr mkIntConst ( Symbol  name)
inline

Creates an integer constant.

Definition at line 811 of file Context.java.

812 {
813 return (IntExpr) mkConst(name, getIntSort());
814 }

◆ mkIntersect()

final< R extends Sort > ReExpr< R > mkIntersect ( Expr< ReSort< R > >...  t)
inline

Create the intersection of regular languages.

Definition at line 2730 of file Context.java.

2731 {
2732 checkContextMatch(t);
2733 return (ReExpr<R>) Expr.create(this, Native.mkReIntersect(nCtx(), t.length, AST.arrayToNative(t)));
2734 }

◆ mkIntSort()

IntSort mkIntSort ( )
inline

Create a new integer sort.

Definition at line 222 of file Context.java.

223 {
224 return new IntSort(this);
225 }

◆ mkIsDigit()

BoolExpr mkIsDigit ( Expr< CharSort >  ch)
inline

Create a check if the character is a digit.

Definition at line 2822 of file Context.java.

2823 {
2824 checkContextMatch(ch);
2825 return (BoolExpr) Expr.create(this, Native.mkCharIsDigit(nCtx(), ch.getNativeObject()));
2826 }

◆ mkIsInteger()

BoolExpr mkIsInteger ( Expr< RealSort >  t)
inline

Creates an expression that checks whether a real number is an integer.

Definition at line 1197 of file Context.java.

1198 {
1199 checkContextMatch(t);
1200 return new BoolExpr(this, Native.mkIsInt(nCtx(), t.getNativeObject()));
1201 }

◆ mkITE()

final< R extends Sort > Expr< R > mkITE ( Expr< BoolSort >  t1,
Expr<? extends R >  t2,
Expr<? extends R >  t3 
)
inline

Create an expression representing an if-then-else: ite(t1, t2, t3).

Parameters
t1An expression with Boolean sort
t2An expression
t3An expression with the same sort as t2

Definition at line 963 of file Context.java.

964 {
965 checkContextMatch(t1);
966 checkContextMatch(t2);
967 checkContextMatch(t3);
968 return (Expr<R>) Expr.create(this, Native.mkIte(nCtx(), t1.getNativeObject(),
969 t2.getNativeObject(), t3.getNativeObject()));
970 }

◆ mkLambda() [1/2]

final< R extends Sort > Lambda< R > mkLambda ( Expr<?>[]  boundConstants,
Expr< R >  body 
)
inline

Create a lambda expression.

Creates a lambda expression using a list of constants that will form the set of bound variables.

Definition at line 3185 of file Context.java.

3186 {
3187 return Lambda.of(this, boundConstants, body);
3188 }
Lambda(vs, body)
Definition z3py.py:2432

◆ mkLambda() [2/2]

final< R extends Sort > Lambda< R > mkLambda ( Sort[]  sorts,
Symbol[]  names,
Expr< R >  body 
)
inline

Create a lambda expression.

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 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.

Parameters
sortsthe sorts of the bound variables.
namesnames of the bound variables.
bodythe body of the quantifier.
See also
Context::mkBound

Definition at line 3174 of file Context.java.

3175 {
3176 return Lambda.of(this, sorts, names, body);
3177 }

◆ mkLastIndexOf()

final< R extends Sort > IntExpr mkLastIndexOf ( Expr< SeqSort< R > >  s,
Expr< SeqSort< R > >  substr 
)
inline

Extract the last index of sub-string.

Definition at line 2544 of file Context.java.

2545 {
2546 checkContextMatch(s, substr);
2547 return (IntExpr)Expr.create(this, Native.mkSeqLastIndex(nCtx(), s.getNativeObject(), substr.getNativeObject()));
2548 }

◆ mkLe()

BoolExpr mkLe ( Expr<? extends ArithSort >  t1,
Expr<? extends ArithSort >  t2 
)
inline

Create an expression representing t1 &lt;= t2

Definition at line 1135 of file Context.java.

1136 {
1137 checkContextMatch(t1);
1138 checkContextMatch(t2);
1139 return new BoolExpr(this, Native.mkLe(nCtx(), t1.getNativeObject(),
1140 t2.getNativeObject()));
1141 }

◆ mkLength()

final< R extends Sort > IntExpr mkLength ( Expr< SeqSort< R > >  s)
inline

Retrieve the length of a given sequence.

Definition at line 2442 of file Context.java.

2443 {
2444 checkContextMatch(s);
2445 return (IntExpr) Expr.create(this, Native.mkSeqLength(nCtx(), s.getNativeObject()));
2446 }

◆ mkLinearOrder()

final< R extends Sort > FuncDecl< BoolSort > mkLinearOrder ( R  sort,
int  index 
)
inline

Creates or a linear order.

Parameters
indexThe index of the order.
sortThe sort of the order.

Definition at line 4698 of file Context.java.

4698 {
4699 return (FuncDecl<BoolSort>) FuncDecl.create(
4700 this,
4701 Native.mkLinearOrder(
4702 nCtx(),
4703 sort.getNativeObject(),
4704 index
4705 )
4706 );
4707 }

◆ mkListSort() [1/2]

final< R extends Sort > ListSort< R > mkListSort ( String  name,
R  elemSort 
)
inline

Create a new list sort.

Definition at line 335 of file Context.java.

336 {
337 checkContextMatch(elemSort);
338 return new ListSort<>(this, mkSymbol(name), elemSort);
339 }

◆ mkListSort() [2/2]

final< R extends Sort > ListSort< R > mkListSort ( Symbol  name,
R  elemSort 
)
inline

Create a new list sort.

Definition at line 325 of file Context.java.

326 {
327 checkContextMatch(name);
328 checkContextMatch(elemSort);
329 return new ListSort<>(this, name, elemSort);
330 }

◆ mkLoop() [1/2]

final< R extends Sort > ReExpr< R > mkLoop ( Expr< ReSort< R > >  re,
int  lo 
)
inline

Take the lower-bounded Kleene star of a regular expression.

Definition at line 2673 of file Context.java.

2674 {
2675 return (ReExpr<R>) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, 0));
2676 }

◆ mkLoop() [2/2]

final< R extends Sort > ReExpr< R > mkLoop ( Expr< ReSort< R > >  re,
int  lo,
int  hi 
)
inline

Take the lower and upper-bounded Kleene star of a regular expression.

Definition at line 2665 of file Context.java.

2666 {
2667 return (ReExpr<R>) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, hi));
2668 }

◆ mkLt()

BoolExpr mkLt ( Expr<? extends ArithSort >  t1,
Expr<? extends ArithSort >  t2 
)
inline

Create an expression representing t1 &lt; t2

Definition at line 1124 of file Context.java.

1125 {
1126 checkContextMatch(t1);
1127 checkContextMatch(t2);
1128 return new BoolExpr(this, Native.mkLt(nCtx(), t1.getNativeObject(),
1129 t2.getNativeObject()));
1130 }

◆ mkMap()

final< D extends Sort, R1 extends Sort, R2 extends Sort > ArrayExpr< D, R2 > mkMap ( FuncDecl< R2 >  f,
Expr< ArraySort< D, R1 > >...  args 
)
inline

Maps f on the argument arrays. Remarks: Each element of 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].

See also
Context::mkArraySort
Context::mkSelect
Context::mkStore

Definition at line 2049 of file Context.java.

2050 {
2051 checkContextMatch(f);
2052 checkContextMatch(args);
2053 return (ArrayExpr<D, R2>) Expr.create(this, Native.mkMap(nCtx(),
2054 f.getNativeObject(), AST.arrayLength(args),
2055 AST.arrayToNative(args)));
2056 }

◆ mkMod()

IntExpr mkMod ( Expr< IntSort >  t1,
Expr< IntSort >  t2 
)
inline

Create an expression representing t1 mod t2. Remarks: The arguments must have int type.

Definition at line 1086 of file Context.java.

1087 {
1088 checkContextMatch(t1);
1089 checkContextMatch(t2);
1090 return new IntExpr(this, Native.mkMod(nCtx(), t1.getNativeObject(),
1091 t2.getNativeObject()));
1092 }

◆ mkMul()

final< R extends ArithSort > ArithExpr< R > mkMul ( Expr<? extends R >...  t)
inline

Create an expression representing t[0] * t[1] * ....

Definition at line 1042 of file Context.java.

1043 {
1044 checkContextMatch(t);
1045 return (ArithExpr<R>) Expr.create(this,
1046 Native.mkMul(nCtx(), t.length, AST.arrayToNative(t)));
1047 }

◆ mkNot()

final BoolExpr mkNot ( Expr< BoolSort >  a)
inline

Create an expression representing not(a).

Definition at line 950 of file Context.java.

951 {
952 checkContextMatch(a);
953 return new BoolExpr(this, Native.mkNot(nCtx(), a.getNativeObject()));
954 }

◆ mkNth()

final< R extends Sort > Expr< R > mkNth ( Expr< SeqSort< R > >  s,
Expr< IntSort >  index 
)
inline

Retrieve element at index.

Definition at line 2516 of file Context.java.

2517 {
2518 checkContextMatch(s, index);
2519 return (Expr<R>) Expr.create(this, Native.mkSeqNth(nCtx(), s.getNativeObject(), index.getNativeObject()));
2520 }

◆ mkNumeral() [1/3]

final< R extends Sort > Expr< R > mkNumeral ( int  v,
R  ty 
)
inline

Create a Term of a given sort. This function can be used to create numerals that fit in a machine integer. It is slightly faster than MakeNumeral since it is not necessary to parse a string.

Parameters
vValue of the numeral
tySort of the numeral
Returns
A Term with value v and type ty

Definition at line 2901 of file Context.java.

2902 {
2903 checkContextMatch(ty);
2904 return (Expr<R>) Expr.create(this, Native.mkInt(nCtx(), v, ty.getNativeObject()));
2905 }

◆ mkNumeral() [2/3]

final< R extends Sort > Expr< R > mkNumeral ( long  v,
R  ty 
)
inline

Create a Term of a given sort. This function can be used to create numerals that fit in a machine integer. It is slightly faster than MakeNumeral since it is not necessary to parse a string.

Parameters
vValue of the numeral
tySort of the numeral
Returns
A Term with value v and type ty

Definition at line 2917 of file Context.java.

2918 {
2919 checkContextMatch(ty);
2920 return (Expr<R>) Expr.create(this,
2921 Native.mkInt64(nCtx(), v, ty.getNativeObject()));
2922 }

◆ mkNumeral() [3/3]

final< R extends Sort > Expr< R > mkNumeral ( String  v,
R  ty 
)
inline

Create a Term of a given sort.

Parameters
vA 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]*.
tyThe sort of the numeral. In the current implementation, the given sort can be an int, real, or bit-vectors of arbitrary size.
Returns
A Term with value v and sort ty

Definition at line 2884 of file Context.java.

2885 {
2886 checkContextMatch(ty);
2887 return (Expr<R>) Expr.create(this,
2888 Native.mkNumeral(nCtx(), v, ty.getNativeObject()));
2889 }

◆ mkOptimize()

Optimize mkOptimize ( )
inline

Create a Optimize context.

Definition at line 3917 of file Context.java.

3918 {
3919 return new Optimize(this);
3920 }

◆ mkOption()

final< R extends Sort > ReExpr< R > mkOption ( Expr< ReSort< R > >  re)
inline

Create the optional regular expression.

Definition at line 2691 of file Context.java.

2692 {
2693 checkContextMatch(re);
2694 return (ReExpr<R>) Expr.create(this, Native.mkReOption(nCtx(), re.getNativeObject()));
2695 }

◆ mkOr()

final BoolExpr mkOr ( Expr< BoolSort >...  t)
inline

Create an expression representing t[0] or t[1] or ....

Definition at line 1020 of file Context.java.

1021 {
1022 checkContextMatch(t);
1023 return new BoolExpr(this, Native.mkOr(nCtx(), t.length,
1024 AST.arrayToNative(t)));
1025 }

◆ mkParams()

Params mkParams ( )
inline

Creates a new ParameterSet.

Definition at line 3298 of file Context.java.

3299 {
3300 return new Params(this);
3301 }

◆ mkPartialOrder()

final< R extends Sort > FuncDecl< BoolSort > mkPartialOrder ( R  sort,
int  index 
)
inline

Creates a partial order.

Parameters
indexThe index of the order.
sortThe sort of the order.

Definition at line 4714 of file Context.java.

4714 {
4715 return (FuncDecl<BoolSort>) FuncDecl.create(
4716 this,
4717 Native.mkPartialOrder(
4718 nCtx(),
4719 sort.getNativeObject(),
4720 index
4721 )
4722 );
4723 }

◆ mkPattern()

final Pattern mkPattern ( Expr<?>...  terms)
inline

Create a quantifier pattern.

Definition at line 738 of file Context.java.

739 {
740 if (terms.length == 0)
741 throw new Z3Exception("Cannot create a pattern from zero terms");
742
743 long[] termsNative = AST.arrayToNative(terms);
744 return new Pattern(this, Native.mkPattern(nCtx(), terms.length,
745 termsNative));
746 }

◆ mkPBEq()

BoolExpr mkPBEq ( int[]  coeffs,
Expr< BoolSort >[]  args,
int  k 
)
inline

Create a pseudo-Boolean equal constraint.

Definition at line 2867 of file Context.java.

2868 {
2869 checkContextMatch(args);
2870 return (BoolExpr) Expr.create(this, Native.mkPbeq(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2871 }

◆ mkPBGe()

BoolExpr mkPBGe ( int[]  coeffs,
Expr< BoolSort >[]  args,
int  k 
)
inline

Create a pseudo-Boolean greater-or-equal constraint.

Definition at line 2858 of file Context.java.

2859 {
2860 checkContextMatch(args);
2861 return (BoolExpr) Expr.create(this, Native.mkPbge(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2862 }

◆ mkPBLe()

BoolExpr mkPBLe ( int[]  coeffs,
Expr< BoolSort >[]  args,
int  k 
)
inline

Create a pseudo-Boolean less-or-equal constraint.

Definition at line 2849 of file Context.java.

2850 {
2851 checkContextMatch(args);
2852 return (BoolExpr) Expr.create(this, Native.mkPble(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2853 }

◆ mkPiecewiseLinearOrder()

final< R extends Sort > FuncDecl< BoolSort > mkPiecewiseLinearOrder ( R  sort,
int  index 
)
inline

Creates a piecewise linear order.

Parameters
indexThe index of the order.
sortThe sort of the order.

Definition at line 4745 of file Context.java.

4745 {
4746 return (FuncDecl<BoolSort>) FuncDecl.create(
4747 this,
4748 Native.mkPiecewiseLinearOrder(
4749 nCtx(),
4750 sort.getNativeObject(),
4751 index
4752 )
4753 );
4754 }

◆ mkPlus()

final< R extends Sort > ReExpr< R > mkPlus ( Expr< ReSort< R > >  re)
inline

Take the Kleene plus of a regular expression.

Definition at line 2682 of file Context.java.

2683 {
2684 checkContextMatch(re);
2685 return (ReExpr<R>) Expr.create(this, Native.mkRePlus(nCtx(), re.getNativeObject()));
2686 }

◆ mkPower() [1/2]

final< R extends Sort > ReExpr< R > mkPower ( Expr< ReSort< R > >  re,
int  n 
)
inline

Create power regular expression.

Definition at line 2657 of file Context.java.

2658 {
2659 return (ReExpr<R>) Expr.create(this, Native.mkRePower(nCtx(), re.getNativeObject(), n));
2660 }

◆ mkPower() [2/2]

final< R extends ArithSort > ArithExpr< R > mkPower ( Expr<? extends R >  t1,
Expr<? extends R >  t2 
)
inline

Create an expression representing t1 ^ t2.

Definition at line 1110 of file Context.java.

1112 {
1113 checkContextMatch(t1);
1114 checkContextMatch(t2);
1115 return (ArithExpr<R>) Expr.create(
1116 this,
1117 Native.mkPower(nCtx(), t1.getNativeObject(),
1118 t2.getNativeObject()));
1119 }

◆ mkPrefixOf()

final< R extends Sort > BoolExpr mkPrefixOf ( Expr< SeqSort< R > >  s1,
Expr< SeqSort< R > >  s2 
)
inline

Check for sequence prefix.

Definition at line 2460 of file Context.java.

2461 {
2462 checkContextMatch(s1, s2);
2463 return (BoolExpr) Expr.create(this, Native.mkSeqPrefix(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2464 }

◆ mkProbe()

Probe mkProbe ( String  name)
inline

Creates a new Probe.

Definition at line 3733 of file Context.java.

3734 {
3735 return new Probe(this, name);
3736 }

◆ mkPropagateFunction()

final< R extends Sort > FuncDecl< R > mkPropagateFunction ( Symbol  name,
Sort[]  domain,
R  range 
)
inline

Definition at line 601 of file Context.java.

602 {
603 checkContextMatch(name);
604 checkContextMatch(domain);
605 checkContextMatch(range);
606 long f = Native.solverPropagateDeclare(
607 this.nCtx(),
608 name.getNativeObject(),
609 AST.arrayLength(domain),
610 AST.arrayToNative(domain),
611 range.getNativeObject());
612 return new FuncDecl<>(this, f);
613 }

◆ mkQuantifier() [1/2]

Quantifier mkQuantifier ( boolean  universal,
Expr<?>[]  boundConstants,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Create a Quantifier

See also
Context::mkForall

Definition at line 3143 of file Context.java.

3146 {
3147
3148 if (universal)
3149 return mkForall(boundConstants, body, weight, patterns, noPatterns,
3150 quantifierID, skolemID);
3151 else
3152 return mkExists(boundConstants, body, weight, patterns, noPatterns,
3153 quantifierID, skolemID);
3154 }
Quantifier mkForall(Sort[] sorts, Symbol[] names, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)
Quantifier mkExists(Sort[] sorts, Symbol[] names, Expr< BoolSort > body, int weight, Pattern[] patterns, Expr<?>[] noPatterns, Symbol quantifierID, Symbol skolemID)

◆ mkQuantifier() [2/2]

Quantifier mkQuantifier ( boolean  universal,
Sort[]  sorts,
Symbol[]  names,
Expr< BoolSort >  body,
int  weight,
Pattern[]  patterns,
Expr<?>[]  noPatterns,
Symbol  quantifierID,
Symbol  skolemID 
)
inline

Create a Quantifier.

See also
Context::mkForall

Definition at line 3125 of file Context.java.

3129 {
3130
3131 if (universal)
3132 return mkForall(sorts, names, body, weight, patterns, noPatterns,
3133 quantifierID, skolemID);
3134 else
3135 return mkExists(sorts, names, body, weight, patterns, noPatterns,
3136 quantifierID, skolemID);
3137 }

◆ mkRange()

final ReExpr< SeqSort< CharSort > > mkRange ( Expr< SeqSort< CharSort > >  lo,
Expr< SeqSort< CharSort > >  hi 
)
inline

Create a range expression.

Definition at line 2777 of file Context.java.

2778 {
2779 checkContextMatch(lo, hi);
2780 return (ReExpr<SeqSort<CharSort>>) Expr.create(this, Native.mkReRange(nCtx(), lo.getNativeObject(), hi.getNativeObject()));
2781 }

◆ mkReal() [1/4]

RatNum mkReal ( int  num,
int  den 
)
inline

Create a real from a fraction.

Parameters
numnumerator of rational.
dendenominator of rational.
Returns
A Term with value num/den and sort Real
See also
Context::mkNumeral

Definition at line 2933 of file Context.java.

2934 {
2935 if (den == 0) {
2936 throw new Z3Exception("Denominator is zero");
2937 }
2938
2939 return new RatNum(this, Native.mkReal(nCtx(), num, den));
2940 }

◆ mkReal() [2/4]

RatNum mkReal ( int  v)
inline

Create a real numeral.

Parameters
vvalue of the numeral.
Returns
A Term with value v and sort Real

Definition at line 2961 of file Context.java.

2962 {
2963
2964 return new RatNum(this, Native.mkInt(nCtx(), v, getRealSort()
2965 .getNativeObject()));
2966 }

◆ mkReal() [3/4]

RatNum mkReal ( long  v)
inline

Create a real numeral.

Parameters
vvalue of the numeral.
Returns
A Term with value v and sort Real

Definition at line 2974 of file Context.java.

2975 {
2976
2977 return new RatNum(this, Native.mkInt64(nCtx(), v, getRealSort()
2978 .getNativeObject()));
2979 }

◆ mkReal() [4/4]

RatNum mkReal ( String  v)
inline

Create a real numeral.

Parameters
vA string representing the Term value in decimal notation.
Returns
A Term with value v and sort Real

Definition at line 2948 of file Context.java.

2949 {
2950
2951 return new RatNum(this, Native.mkNumeral(nCtx(), v, getRealSort()
2952 .getNativeObject()));
2953 }

◆ mkReal2Int()

IntExpr mkReal2Int ( Expr< RealSort >  t)
inline

Coerce a real to an integer. Remarks: The semantics of this function follows the SMT-LIB standard for the function to_int. The argument must be of real sort.

Definition at line 1188 of file Context.java.

1189 {
1190 checkContextMatch(t);
1191 return new IntExpr(this, Native.mkReal2int(nCtx(), t.getNativeObject()));
1192 }

◆ mkRealConst() [1/2]

RealExpr mkRealConst ( String  name)
inline

Creates a real constant.

Definition at line 835 of file Context.java.

836 {
837 return (RealExpr) mkConst(name, getRealSort());
838 }

◆ mkRealConst() [2/2]

RealExpr mkRealConst ( Symbol  name)
inline

Creates a real constant.

Definition at line 827 of file Context.java.

828 {
829 return (RealExpr) mkConst(name, getRealSort());
830 }

◆ mkRealPart()

RealExpr mkRealPart ( Expr< ComplexSort >  value)
inline

Returns the Real-valued real component of a Complex expression.

Definition at line 861 of file Context.java.

862 {
863 checkContextMatch(value);
864 return new RealExpr(this, Native.mkRealPart(nCtx(), value.getNativeObject()));
865 }

◆ mkRealSort()

RealSort mkRealSort ( )
inline

Create a real sort.

Definition at line 230 of file Context.java.

231 {
232 return new RealSort(this);
233 }

◆ mkRecFuncDecl()

final< R extends Sort > FuncDecl< R > mkRecFuncDecl ( Symbol  name,
Sort[]  domain,
R  range 
)
inline

Creates a new recursive function declaration.

Definition at line 655 of file Context.java.

656 {
657 checkContextMatch(name);
658 checkContextMatch(domain);
659 checkContextMatch(range);
660 return new FuncDecl<>(this, name, domain, range, true);
661 }

◆ mkRem()

IntExpr mkRem ( Expr< IntSort >  t1,
Expr< IntSort >  t2 
)
inline

Create an expression representing t1 rem t2. Remarks: The arguments must have int type.

Definition at line 1099 of file Context.java.

1100 {
1101 checkContextMatch(t1);
1102 checkContextMatch(t2);
1103 return new IntExpr(this, Native.mkRem(nCtx(), t1.getNativeObject(),
1104 t2.getNativeObject()));
1105 }

◆ mkRepeat()

BitVecExpr mkRepeat ( int  i,
Expr< BitVecSort >  t 
)
inline

Bit-vector repetition. Remarks: The argument t must have a bit-vector sort.

Definition at line 1641 of file Context.java.

1642 {
1643 checkContextMatch(t);
1644 return new BitVecExpr(this, Native.mkRepeat(nCtx(), i,
1645 t.getNativeObject()));
1646 }

◆ mkReplace()

final< R extends Sort > SeqExpr< R > mkReplace ( Expr< SeqSort< R > >  s,
Expr< SeqSort< R > >  src,
Expr< SeqSort< R > >  dst 
)
inline

Replace the first occurrence of src by dst in s.

Definition at line 2593 of file Context.java.

2594 {
2595 checkContextMatch(s, src, dst);
2596 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplace(nCtx(), s.getNativeObject(), src.getNativeObject(), dst.getNativeObject()));
2597 }

◆ mkReplaceAll()

final< R extends Sort > SeqExpr< R > mkReplaceAll ( Expr< SeqSort< R > >  s,
Expr< SeqSort< R > >  src,
Expr< SeqSort< R > >  dst 
)
inline

Replace all occurrences of src by dst in s.

Definition at line 2602 of file Context.java.

2603 {
2604 checkContextMatch(s, src, dst);
2605 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceAll(nCtx(), s.getNativeObject(), src.getNativeObject(), dst.getNativeObject()));
2606 }

◆ mkReplaceRe()

final< R extends Sort > SeqExpr< R > mkReplaceRe ( Expr< SeqSort< R > >  s,
ReExpr< SeqSort< R > >  re,
Expr< SeqSort< R > >  dst 
)
inline

Replace the first occurrence of regular expression re with dst in s.

Definition at line 2611 of file Context.java.

2612 {
2613 checkContextMatch(s, re, dst);
2614 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceRe(nCtx(), s.getNativeObject(), re.getNativeObject(), dst.getNativeObject()));
2615 }

◆ mkReplaceReAll()

final< R extends Sort > SeqExpr< R > mkReplaceReAll ( Expr< SeqSort< R > >  s,
ReExpr< SeqSort< R > >  re,
Expr< SeqSort< R > >  dst 
)
inline

Replace all occurrences of regular expression re with dst in s.

Definition at line 2620 of file Context.java.

2621 {
2622 checkContextMatch(s, re, dst);
2623 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceReAll(nCtx(), s.getNativeObject(), re.getNativeObject(), dst.getNativeObject()));
2624 }

◆ mkReSort()

final< R extends Sort > ReSort< R > mkReSort ( R  s)
inline

Create a new regular expression sort

Definition at line 283 of file Context.java.

284 {
285 return new ReSort<>(this, Native.mkReSort(nCtx(), s.getNativeObject()));
286 }

◆ mkSelect() [1/2]

final< D extends Sort, R extends Sort > Expr< R > mkSelect ( Expr< ArraySort< D, R > >  a,
Expr< D >  i 
)
inline

Array read. Remarks: The argument 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.

See also
Context::mkArraySort
Context::mkStore

Definition at line 1937 of file Context.java.

1938 {
1939 checkContextMatch(a);
1940 checkContextMatch(i);
1941 return (Expr<R>) Expr.create(
1942 this,
1943 Native.mkSelect(nCtx(), a.getNativeObject(),
1944 i.getNativeObject()));
1945 }

◆ mkSelect() [2/2]

final< R extends Sort > Expr< R > mkSelect ( Expr< ArraySort< Sort, R > >  a,
Expr<?>[]  args 
)
inline

Array read. Remarks: The argument 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.

See also
Context::mkArraySort
Context::mkStore

Definition at line 1959 of file Context.java.

1960 {
1961 checkContextMatch(a);
1962 checkContextMatch(args);
1963 return (Expr<R>) Expr.create(
1964 this,
1965 Native.mkSelectN(nCtx(), a.getNativeObject(), args.length, AST.arrayToNative(args)));
1966 }

◆ mkSeqFoldl()

final< R extends Sort, A extends Sort > Expr< A > mkSeqFoldl ( Expr<?>  f,
Expr< A >  a,
Expr< SeqSort< R > >  s 
)
inline

Left fold of function f over sequence s with accumulator a. Applies f to accumulate values from left to right over the sequence.

Definition at line 2574 of file Context.java.

2575 {
2576 checkContextMatch(f, a, s);
2577 return (Expr<A>) Expr.create(this, Native.mkSeqFoldl(nCtx(), f.getNativeObject(), a.getNativeObject(), s.getNativeObject()));
2578 }

◆ mkSeqFoldli()

final< R extends Sort, A extends Sort > Expr< A > mkSeqFoldli ( Expr<?>  f,
Expr< IntSort >  i,
Expr< A >  a,
Expr< SeqSort< R > >  s 
)
inline

Left fold of function f over sequence s with accumulator a starting at index i. Applies f to accumulate values from left to right over the sequence, tracking the index starting from i.

Definition at line 2584 of file Context.java.

2585 {
2586 checkContextMatch(f, i, a, s);
2587 return (Expr<A>) Expr.create(this, Native.mkSeqFoldli(nCtx(), f.getNativeObject(), i.getNativeObject(), a.getNativeObject(), s.getNativeObject()));
2588 }

◆ mkSeqMap()

final< R extends Sort > SeqExpr< R > mkSeqMap ( Expr<?>  f,
Expr< SeqSort< R > >  s 
)
inline

Map function f over sequence s. Returns a new sequence where f is applied to each element of s.

Definition at line 2554 of file Context.java.

2555 {
2556 checkContextMatch(f, s);
2557 return (SeqExpr<R>) Expr.create(this, Native.mkSeqMap(nCtx(), f.getNativeObject(), s.getNativeObject()));
2558 }

◆ mkSeqMapi()

final< R extends Sort > SeqExpr< R > mkSeqMapi ( Expr<?>  f,
Expr< IntSort >  i,
Expr< SeqSort< R > >  s 
)
inline

Map function f over sequence s starting at index i. Returns a new sequence where f is applied to each element of s along with its index starting from i.

Definition at line 2564 of file Context.java.

2565 {
2566 checkContextMatch(f, i, s);
2567 return (SeqExpr<R>) Expr.create(this, Native.mkSeqMapi(nCtx(), f.getNativeObject(), i.getNativeObject(), s.getNativeObject()));
2568 }

◆ mkSeqPower()

final< R extends Sort > SeqExpr< R > mkSeqPower ( Expr< SeqSort< R > >  s,
Expr< IntSort >  n 
)
inline

Retrieve the sequence s concatenated n times with itself.

Definition at line 2451 of file Context.java.

2452 {
2453 checkContextMatch(s, n);
2454 return (SeqExpr<R>) Expr.create(this, Native.mkSeqPower(nCtx(), s.getNativeObject(), n.getNativeObject()));
2455 }

◆ mkSeqSort()

final< R extends Sort > SeqSort< R > mkSeqSort ( R  s)
inline

Create a new sequence sort

Definition at line 275 of file Context.java.

276 {
277 return new SeqSort<>(this, Native.mkSeqSort(nCtx(), s.getNativeObject()));
278 }

◆ mkSetAdd()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetAdd ( Expr< ArraySort< D, BoolSort > >  set,
Expr< D >  element 
)
inline

Add an element to the set.

Definition at line 2127 of file Context.java.

2128 {
2129 checkContextMatch(set);
2130 checkContextMatch(element);
2131 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2132 Native.mkSetAdd(nCtx(), set.getNativeObject(),
2133 element.getNativeObject()));
2134 }

◆ mkSetComplement()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetComplement ( Expr< ArraySort< D, BoolSort > >  arg)
inline

Take the complement of a set.

Definition at line 2187 of file Context.java.

2188 {
2189 checkContextMatch(arg);
2190 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2191 Native.mkSetComplement(nCtx(), arg.getNativeObject()));
2192 }

◆ mkSetDel()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetDel ( Expr< ArraySort< D, BoolSort > >  set,
Expr< D >  element 
)
inline

Remove an element from a set.

Definition at line 2139 of file Context.java.

2140 {
2141 checkContextMatch(set);
2142 checkContextMatch(element);
2143 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2144 Native.mkSetDel(nCtx(), set.getNativeObject(),
2145 element.getNativeObject()));
2146 }

◆ mkSetDifference()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetDifference ( Expr< ArraySort< D, BoolSort > >  arg1,
Expr< ArraySort< D, BoolSort > >  arg2 
)
inline

Take the difference between two sets.

Definition at line 2175 of file Context.java.

2176 {
2177 checkContextMatch(arg1);
2178 checkContextMatch(arg2);
2179 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2180 Native.mkSetDifference(nCtx(), arg1.getNativeObject(),
2181 arg2.getNativeObject()));
2182 }

◆ mkSetIntersection()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetIntersection ( Expr< ArraySort< D, BoolSort > >...  args)
inline

Take the intersection of a list of sets.

Definition at line 2164 of file Context.java.

2165 {
2166 checkContextMatch(args);
2167 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2168 Native.mkSetIntersect(nCtx(), args.length,
2169 AST.arrayToNative(args)));
2170 }

◆ mkSetMembership()

final< D extends Sort > BoolExpr mkSetMembership ( Expr< D >  elem,
Expr< ArraySort< D, BoolSort > >  set 
)
inline

Check for set membership.

Definition at line 2197 of file Context.java.

2198 {
2199 checkContextMatch(elem);
2200 checkContextMatch(set);
2201 return (BoolExpr) Expr.create(this,
2202 Native.mkSetMember(nCtx(), elem.getNativeObject(),
2203 set.getNativeObject()));
2204 }

◆ mkSetSort()

final< D extends Sort > SetSort< D > mkSetSort ( D  ty)
inline

Create a set type.

Definition at line 2098 of file Context.java.

2099 {
2100 checkContextMatch(ty);
2101 return new SetSort<>(this, ty);
2102 }

◆ mkSetSubset()

final< D extends Sort > BoolExpr mkSetSubset ( Expr< ArraySort< D, BoolSort > >  arg1,
Expr< ArraySort< D, BoolSort > >  arg2 
)
inline

Check for subsetness of sets.

Definition at line 2209 of file Context.java.

2210 {
2211 checkContextMatch(arg1);
2212 checkContextMatch(arg2);
2213 return (BoolExpr) Expr.create(this,
2214 Native.mkSetSubset(nCtx(), arg1.getNativeObject(),
2215 arg2.getNativeObject()));
2216 }

◆ mkSetUnion()

final< D extends Sort > ArrayExpr< D, BoolSort > mkSetUnion ( Expr< ArraySort< D, BoolSort > >...  args)
inline

Take the union of a list of sets.

Definition at line 2152 of file Context.java.

2153 {
2154 checkContextMatch(args);
2155 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2156 Native.mkSetUnion(nCtx(), args.length,
2157 AST.arrayToNative(args)));
2158 }

◆ mkSignExt()

BitVecExpr mkSignExt ( int  i,
Expr< BitVecSort >  t 
)
inline

Bit-vector sign extension. Remarks: Sign-extends the given bit-vector to the (signed) equivalent bitvector of size m+i, where m is the size of the given bit-vector. The argument t must have a bit-vector sort.

Definition at line 1615 of file Context.java.

1616 {
1617 checkContextMatch(t);
1618 return new BitVecExpr(this, Native.mkSignExt(nCtx(), i,
1619 t.getNativeObject()));
1620 }

◆ mkSimpleSolver()

Solver mkSimpleSolver ( )
inline

Creates a new (incremental) solver.

Definition at line 3880 of file Context.java.

3881 {
3882 return new Solver(this, Native.mkSimpleSolver(nCtx()));
3883 }

◆ mkSimplifier()

Simplifier mkSimplifier ( String  name)
inline

Creates a new Simplifier.

Definition at line 3633 of file Context.java.

3634 {
3635 return new Simplifier(this, name);
3636 }

◆ mkSolver() [1/5]

Solver mkSolver ( )
inline

Creates a new (incremental) solver. Remarks: This solver also uses a set of builtin tactics for handling the first check-sat command, and check-sat commands that take more than a given number of milliseconds to be solved.

Definition at line 3846 of file Context.java.

3847 {
3848 return mkSolver((Symbol) null);
3849 }

Referenced by Tactic.getSolver().

◆ mkSolver() [2/5]

Solver mkSolver ( Solver  s,
Simplifier  simp 
)
inline

Creates a solver that is uses the simplifier pre-processing.

Definition at line 3901 of file Context.java.

3902 {
3903 return new Solver(this, Native.solverAddSimplifier(nCtx(), s.getNativeObject(), simp.getNativeObject()));
3904 }

◆ mkSolver() [3/5]

Solver mkSolver ( String  logic)
inline

Creates a new (incremental) solver.

See also
Context::mkSolver

Definition at line 3872 of file Context.java.

3873 {
3874 return mkSolver(mkSymbol(logic));
3875 }

◆ mkSolver() [4/5]

Solver mkSolver ( Symbol  logic)
inline

Creates a new (incremental) solver. Remarks: This solver also uses a set of builtin tactics for handling the first check-sat command, and check-sat commands that take more than a given number of milliseconds to be solved.

Definition at line 3858 of file Context.java.

3859 {
3860
3861 if (logic == null)
3862 return new Solver(this, Native.mkSolver(nCtx()));
3863 else
3864 return new Solver(this, Native.mkSolverForLogic(nCtx(),
3865 logic.getNativeObject()));
3866 }

◆ mkSolver() [5/5]

Solver mkSolver ( Tactic  t)
inline

Creates a solver that is implemented using the given tactic. Remarks: The solver supports the commands Push and Pop, but it will always solve each check from scratch.

Definition at line 3891 of file Context.java.

3892 {
3893
3894 return new Solver(this, Native.mkSolverFromTactic(nCtx(),
3895 t.getNativeObject()));
3896 }

◆ mkStar()

final< R extends Sort > ReExpr< R > mkStar ( Expr< ReSort< R > >  re)
inline

Take the Kleene star of a regular expression.

Definition at line 2648 of file Context.java.

2649 {
2650 checkContextMatch(re);
2651 return (ReExpr<R>) Expr.create(this, Native.mkReStar(nCtx(), re.getNativeObject()));
2652 }

◆ mkStore() [1/2]

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkStore ( Expr< ArraySort< D, R > >  a,
Expr< D >  i,
Expr< R >  v 
)
inline

Array update. Remarks: The node 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).

See also
Context::mkArraySort
Context::mkSelect

Definition at line 1984 of file Context.java.

1985 {
1986 checkContextMatch(a);
1987 checkContextMatch(i);
1988 checkContextMatch(v);
1989 return new ArrayExpr<>(this, Native.mkStore(nCtx(), a.getNativeObject(),
1990 i.getNativeObject(), v.getNativeObject()));
1991 }

◆ mkStore() [2/2]

final< R extends Sort > ArrayExpr< Sort, R > mkStore ( Expr< ArraySort< Sort, R > >  a,
Expr<?>[]  args,
Expr< R >  v 
)
inline

Array update. Remarks: The node 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).

See also
Context::mkArraySort
Context::mkSelect

Definition at line 2009 of file Context.java.

2010 {
2011 checkContextMatch(a);
2012 checkContextMatch(args);
2013 checkContextMatch(v);
2014 return new ArrayExpr<>(this, Native.mkStoreN(nCtx(), a.getNativeObject(),
2015 args.length, AST.arrayToNative(args), v.getNativeObject()));
2016 }

◆ mkString()

SeqExpr< CharSort > mkString ( String  s)
inline

Create a string constant.

Definition at line 2383 of file Context.java.

2384 {
2385 StringBuilder buf = new StringBuilder();
2386 for (int i = 0; i < s.length(); i += Character.charCount(s.codePointAt(i))) {
2387 int code = s.codePointAt(i);
2388 if (code <= 32 || 127 < code)
2389 buf.append(String.format("\\u{%x}", code));
2390 else
2391 buf.append(s.charAt(i));
2392 }
2393 return (SeqExpr<CharSort>) Expr.create(this, Native.mkString(nCtx(), buf.toString()));
2394 }

◆ MkStringLe()

BoolExpr MkStringLe ( Expr< SeqSort< CharSort > >  s1,
Expr< SeqSort< CharSort > >  s2 
)
inline

Check if the string s1 is lexicographically less or equal to s2.

Definition at line 2497 of file Context.java.

2498 {
2499 checkContextMatch(s1, s2);
2500 return new BoolExpr(this, Native.mkStrLe(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2501 }

◆ MkStringLt()

BoolExpr MkStringLt ( Expr< SeqSort< CharSort > >  s1,
Expr< SeqSort< CharSort > >  s2 
)
inline

Check if the string s1 is lexicographically strictly less than s2.

Definition at line 2488 of file Context.java.

2489 {
2490 checkContextMatch(s1, s2);
2491 return new BoolExpr(this, Native.mkStrLt(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2492 }

◆ mkStringSort()

SeqSort< CharSort > mkStringSort ( )
inline

Create a new string sort

Definition at line 267 of file Context.java.

268 {
269 return new SeqSort<>(this, Native.mkStringSort(nCtx()));
270 }

◆ mkSub()

final< R extends ArithSort > ArithExpr< R > mkSub ( Expr<? extends R >...  t)
inline

Create an expression representing t[0] - t[1] - ....

Definition at line 1053 of file Context.java.

1054 {
1055 checkContextMatch(t);
1056 return (ArithExpr<R>) Expr.create(this,
1057 Native.mkSub(nCtx(), t.length, AST.arrayToNative(t)));
1058 }

◆ mkSuffixOf()

final< R extends Sort > BoolExpr mkSuffixOf ( Expr< SeqSort< R > >  s1,
Expr< SeqSort< R > >  s2 
)
inline

Check for sequence suffix.

Definition at line 2469 of file Context.java.

2470 {
2471 checkContextMatch(s1, s2);
2472 return (BoolExpr)Expr.create(this, Native.mkSeqSuffix(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2473 }

◆ mkSymbol() [1/2]

IntSymbol mkSymbol ( int  i)
inline

Creates a new symbol using an integer. Remarks: Not all integers can be passed to this function. The legal range of unsigned integers is 0 to 2^30-1.

Definition at line 94 of file Context.java.

95 {
96 return new IntSymbol(this, i);
97 }

◆ mkSymbol() [2/2]

StringSymbol mkSymbol ( String  name)
inline

Create a symbol using a string.

Definition at line 102 of file Context.java.

103 {
104 return new StringSymbol(this, name);
105 }

◆ mkTactic()

Tactic mkTactic ( String  name)
inline

Creates a new Tactic.

Definition at line 3336 of file Context.java.

3337 {
3338 return new Tactic(this, name);
3339 }

Referenced by Goal.simplify(), and Goal.simplify().

◆ mkTermArray()

final< D extends Sort, R extends Sort > Expr< R > mkTermArray ( Expr< ArraySort< D, R > >  array)
inline

Access the array default value. Remarks: Produces the default range value, for arrays that can be represented as finite maps with a default range value.

Definition at line 2064 of file Context.java.

2065 {
2066 checkContextMatch(array);
2067 return (Expr<R>) Expr.create(this,
2068 Native.mkArrayDefault(nCtx(), array.getNativeObject()));
2069 }

◆ mkToRe()

final< R extends Sort > ReExpr< SeqSort< R > > mkToRe ( Expr< SeqSort< R > >  s)
inline

Convert a regular expression that accepts sequence s.

Definition at line 2629 of file Context.java.

2630 {
2631 checkContextMatch(s);
2632 return (ReExpr<SeqSort<R>>) Expr.create(this, Native.mkSeqToRe(nCtx(), s.getNativeObject()));
2633 }

◆ mkTransitiveClosure()

final< R extends Sort > FuncDecl< BoolSort > mkTransitiveClosure ( FuncDecl< BoolSort >  f)
inline

Create the transitive closure of a binary relation. The resulting relation is recursive.

Parameters
ffunction declaration of a binary relation

Definition at line 4730 of file Context.java.

4730 {
4731 return (FuncDecl<BoolSort>) FuncDecl.create(
4732 this,
4733 Native.mkTransitiveClosure(
4734 nCtx(),
4735 f.getNativeObject()
4736 )
4737 );
4738 }

◆ mkTreeOrder()

final< R extends Sort > FuncDecl< BoolSort > mkTreeOrder ( R  sort,
int  index 
)
inline

Creates a tree order.

Parameters
indexThe index of the order.
sortThe sort of the order.

Definition at line 4761 of file Context.java.

4761 {
4762 return (FuncDecl<BoolSort>) FuncDecl.create(
4763 this,
4764 Native.mkTreeOrder(
4765 nCtx(),
4766 sort.getNativeObject(),
4767 index
4768 )
4769 );
4770 }

◆ mkTrue()

BoolExpr mkTrue ( )
inline

The true Term.

Definition at line 904 of file Context.java.

905 {
906 return new BoolExpr(this, Native.mkTrue(nCtx()));
907 }

Referenced by Goal.AsBoolExpr().

◆ mkTupleSort()

TupleSort mkTupleSort ( Symbol  name,
Symbol[]  fieldNames,
Sort[]  fieldSorts 
)
inline

Create a new tuple sort.

Definition at line 292 of file Context.java.

294 {
295 checkContextMatch(name);
296 checkContextMatch(fieldNames);
297 checkContextMatch(fieldSorts);
298 return new TupleSort(this, name, fieldNames.length, fieldNames,
299 fieldSorts);
300 }
TupleSort(name, sorts, ctx=None)
Definition z3py.py:6092

◆ mkTypeVariable() [1/2]

TypeVarSort mkTypeVariable ( String  name)
inline

Create a type variable for use in polymorphic functions and datatypes. Type variables can be used as sort parameters in polymorphic datatypes.

Parameters
namename of the type variable
Returns
a new type variable sort

Definition at line 510 of file Context.java.

511 {
512 return mkTypeVariable(mkSymbol(name));
513 }
TypeVarSort mkTypeVariable(Symbol name)
Definition Context.java:498

◆ mkTypeVariable() [2/2]

TypeVarSort mkTypeVariable ( Symbol  name)
inline

Create a type variable for use in polymorphic functions and datatypes. Type variables can be used as sort parameters in polymorphic datatypes.

Parameters
namename of the type variable
Returns
a new type variable sort

Definition at line 498 of file Context.java.

499 {
500 checkContextMatch(name);
501 return new TypeVarSort(this, name);
502 }

◆ mkUnaryMinus()

final< R extends ArithSort > ArithExpr< R > mkUnaryMinus ( Expr< R >  t)
inline

Create an expression representing -t.

Definition at line 1063 of file Context.java.

1064 {
1065 checkContextMatch(t);
1066 return (ArithExpr<R>) Expr.create(this,
1067 Native.mkUnaryMinus(nCtx(), t.getNativeObject()));
1068 }

◆ mkUninterpretedSort() [1/2]

UninterpretedSort mkUninterpretedSort ( String  str)
inline

Create a new uninterpreted sort.

Definition at line 214 of file Context.java.

215 {
216 return mkUninterpretedSort(mkSymbol(str));
217 }
UninterpretedSort mkUninterpretedSort(Symbol s)
Definition Context.java:205

◆ mkUninterpretedSort() [2/2]

UninterpretedSort mkUninterpretedSort ( Symbol  s)
inline

Create a new uninterpreted sort.

Definition at line 205 of file Context.java.

206 {
207 checkContextMatch(s);
208 return new UninterpretedSort(this, s);
209 }

◆ mkUnion()

final< R extends Sort > ReExpr< R > mkUnion ( Expr< ReSort< R > >...  t)
inline

Create the union of regular languages.

Definition at line 2720 of file Context.java.

2721 {
2722 checkContextMatch(t);
2723 return (ReExpr<R>) Expr.create(this, Native.mkReUnion(nCtx(), t.length, AST.arrayToNative(t)));
2724 }

◆ mkUnit()

final< R extends Sort > SeqExpr< R > mkUnit ( Expr< R >  elem)
inline

Create the singleton sequence.

Definition at line 2374 of file Context.java.

2375 {
2376 checkContextMatch(elem);
2377 return (SeqExpr<R>) Expr.create(this, Native.mkSeqUnit(nCtx(), elem.getNativeObject()));
2378 }

◆ mkUpdateField()

final< F extends Sort, R extends Sort > Expr< R > mkUpdateField ( FuncDecl< F >  field,
Expr< R >  t,
Expr< F >  v 
) throws Z3Exception
inline

Update a datatype field at expression t with value v. The function performs a record update at t. The field that is passed in as argument is updated with value v, the remaining fields of t are unchanged.

Definition at line 580 of file Context.java.

582 {
583 return (Expr<R>) Expr.create(this,
584 Native.datatypeUpdateField
585 (nCtx(), field.getNativeObject(),
586 t.getNativeObject(), v.getNativeObject()));
587 }

◆ mkXor()

BoolExpr mkXor ( Expr< BoolSort >  t1,
Expr< BoolSort >  t2 
)
inline

Create an expression representing t1 xor t2.

Definition at line 997 of file Context.java.

998 {
999 checkContextMatch(t1);
1000 checkContextMatch(t2);
1001 return new BoolExpr(this, Native.mkXor(nCtx(), t1.getNativeObject(),
1002 t2.getNativeObject()));
1003 }

◆ mkZeroExt()

BitVecExpr mkZeroExt ( int  i,
Expr< BitVecSort >  t 
)
inline

Bit-vector zero extension. Remarks: Extend the given bit-vector with zeros to the (unsigned) equivalent bitvector of size m+i, where m is the size of the given bit-vector. The argument t must have a bit-vector sort.

Definition at line 1629 of file Context.java.

1630 {
1631 checkContextMatch(t);
1632 return new BitVecExpr(this, Native.mkZeroExt(nCtx(), i,
1633 t.getNativeObject()));
1634 }

◆ nCtx()

long nCtx ( )
inline

◆ not()

Probe not ( Probe  p)
inline

Create a probe that evaluates to true when the value p does not evaluate to true.

Definition at line 3833 of file Context.java.

3834 {
3835 checkContextMatch(p);
3836 return new Probe(this, Native.probeNot(nCtx(), p.getNativeObject()));
3837 }

◆ or()

Probe or ( Probe  p1,
Probe  p2 
)
inline

Create a probe that evaluates to true when the value p1 or p2 evaluate to true.

Definition at line 3822 of file Context.java.

3823 {
3824 checkContextMatch(p1);
3825 checkContextMatch(p2);
3826 return new Probe(this, Native.probeOr(nCtx(), p1.getNativeObject(),
3827 p2.getNativeObject()));
3828 }

◆ orElse()

Tactic orElse ( Tactic  t1,
Tactic  t2 
)
inline

Create a tactic that first applies t1 to a Goal and if it fails then returns the result of t2 applied to the Goal.

Definition at line 3387 of file Context.java.

3388 {
3389 checkContextMatch(t1);
3390 checkContextMatch(t2);
3391 return new Tactic(this, Native.tacticOrElse(nCtx(),
3392 t1.getNativeObject(), t2.getNativeObject()));
3393 }

◆ parAndThen()

Tactic parAndThen ( Tactic  t1,
Tactic  t2 
)
inline

Create a tactic that applies t1 to a given goal and then t2 to every subgoal produced by t1. The subgoals are processed in parallel.

Definition at line 3520 of file Context.java.

3521 {
3522 checkContextMatch(t1);
3523 checkContextMatch(t2);
3524 return new Tactic(this, Native.tacticParAndThen(nCtx(),
3525 t1.getNativeObject(), t2.getNativeObject()));
3526 }

◆ parOr()

Tactic parOr ( Tactic...  t)
inline

Create a tactic that applies the given tactics in parallel until one of them succeeds (i.e., the first that doesn't fail).

Definition at line 3509 of file Context.java.

3510 {
3511 checkContextMatch(t);
3512 return new Tactic(this, Native.tacticParOr(nCtx(),
3513 Tactic.arrayLength(t), Tactic.arrayToNative(t)));
3514 }

◆ parseSMTLIB2File()

BoolExpr[] parseSMTLIB2File ( String  fileName,
Symbol[]  sortNames,
Sort[]  sorts,
Symbol[]  declNames,
FuncDecl<?>[]  decls 
)
inline

Parse the given file using the SMT-LIB2 parser.

See also
Context::parseSMTLIB2String

Definition at line 3263 of file Context.java.

3265 {
3266 int csn = Symbol.arrayLength(sortNames);
3267 int cs = Sort.arrayLength(sorts);
3268 int cdn = Symbol.arrayLength(declNames);
3269 int cd = AST.arrayLength(decls);
3270 if (csn != cs || cdn != cd)
3271 throw new Z3Exception("Argument size mismatch");
3272 ASTVector v = new ASTVector(this, Native.parseSmtlib2File(nCtx(),
3273 fileName, AST.arrayLength(sorts),
3274 Symbol.arrayToNative(sortNames), AST.arrayToNative(sorts),
3275 AST.arrayLength(decls), Symbol.arrayToNative(declNames),
3276 AST.arrayToNative(decls)));
3277 return v.ToBoolExprArray();
3278 }

◆ parseSMTLIB2String()

BoolExpr[] parseSMTLIB2String ( String  str,
Symbol[]  sortNames,
Sort[]  sorts,
Symbol[]  declNames,
FuncDecl<?>[]  decls 
)
inline

Parse the given string using the SMT-LIB2 parser.

Returns
A conjunction of assertions.

If the string contains push/pop commands, the set of assertions returned are the ones in the last scope level.

Definition at line 3242 of file Context.java.

3244 {
3245 int csn = Symbol.arrayLength(sortNames);
3246 int cs = Sort.arrayLength(sorts);
3247 int cdn = Symbol.arrayLength(declNames);
3248 int cd = AST.arrayLength(decls);
3249 if (csn != cs || cdn != cd) {
3250 throw new Z3Exception("Argument size mismatch");
3251 }
3252 ASTVector v = new ASTVector(this, Native.parseSmtlib2String(nCtx(),
3253 str, AST.arrayLength(sorts), Symbol.arrayToNative(sortNames),
3254 AST.arrayToNative(sorts), AST.arrayLength(decls),
3255 Symbol.arrayToNative(declNames), AST.arrayToNative(decls)));
3256 return v.ToBoolExprArray();
3257 }

◆ polynomialSubresultants()

final< R extends Sort > ASTVector polynomialSubresultants ( Expr< R >  p,
Expr< R >  q,
Expr< R >  x 
)
inline

Return the nonzero subresultants of p and q with respect to the "variable" x. Note that any subterm that cannot be viewed as a polynomial is assumed to be a variable.

Parameters
parithmetic term
qarithmetic term
xvariable

Definition at line 4779 of file Context.java.

4779 {
4780 return new ASTVector(
4781 this,
4782 Native.polynomialSubresultants(
4783 nCtx(),
4784 p.getNativeObject(),
4785 q.getNativeObject(),
4786 x.getNativeObject()
4787 )
4788 );
4789 }

◆ qeLite()

Expr<?> qeLite ( ASTVector  vars,
Expr<?>  body 
)
inline

Performs best-effort quantifier elimination for the variables in vars.

Definition at line 3550 of file Context.java.

3551 {
3552 checkContextMatch(vars);
3553 checkContextMatch(body);
3554 return Expr.create(this, Native.qeLite(nCtx(), vars.getNativeObject(),
3555 body.getNativeObject()));
3556 }

◆ qeModelProject()

Expr<?> qeModelProject ( Model  model,
Expr<?>[]  bounds,
Expr<?>  body 
)
inline

Projects the bound applications from body using model.

Definition at line 3561 of file Context.java.

3562 {
3563 checkContextMatch(model);
3564 checkContextMatch(bounds);
3565 checkContextMatch(body);
3566 return Expr.create(this, Native.qeModelProject(nCtx(), model.getNativeObject(),
3567 bounds.length, AST.arrayToNative(bounds), body.getNativeObject()));
3568 }

◆ qeModelProjectSkolem()

Expr<?> qeModelProjectSkolem ( Model  model,
Expr<?>[]  bounds,
Expr<?>  body,
ASTMap  map 
)
inline

Projects bound applications and records Skolem terms in map.

Definition at line 3573 of file Context.java.

3575 {
3576 checkContextMatch(model);
3577 checkContextMatch(bounds);
3578 checkContextMatch(body);
3579 checkContextMatch(map);
3580 return Expr.create(this, Native.qeModelProjectSkolem(nCtx(),
3581 model.getNativeObject(), bounds.length, AST.arrayToNative(bounds),
3582 body.getNativeObject(), map.getNativeObject()));
3583 }
expr map(expr const &f, expr const &list)
Definition z3++.h:2775

◆ qeModelProjectWithWitness()

Expr<?> qeModelProjectWithWitness ( Model  model,
Expr<?>[]  bounds,
Expr<?>  body,
ASTMap  map 
)
inline

Projects bound applications and records witnesses in map.

Definition at line 3588 of file Context.java.

3590 {
3591 checkContextMatch(model);
3592 checkContextMatch(bounds);
3593 checkContextMatch(body);
3594 checkContextMatch(map);
3595 return Expr.create(this, Native.qeModelProjectWithWitness(nCtx(),
3596 model.getNativeObject(), bounds.length, AST.arrayToNative(bounds),
3597 body.getNativeObject(), map.getNativeObject()));
3598 }

◆ repeat()

Tactic repeat ( Tactic  t,
int  max 
)
inline

Create a tactic that keeps applying t until the goal is not modified anymore or the maximum number of iterations max is reached.

Definition at line 3440 of file Context.java.

3441 {
3442 checkContextMatch(t);
3443 return new Tactic(this, Native.tacticRepeat(nCtx(),
3444 t.getNativeObject(), max));
3445 }

◆ sbvToString()

SeqExpr< CharSort > sbvToString ( Expr< BitVecSort >  e)
inline

Convert an signed bitvector expression to a string.

Definition at line 2415 of file Context.java.

2416 {
2417 return (SeqExpr<CharSort>) Expr.create(this, Native.mkSbvToStr(nCtx(), e.getNativeObject()));
2418 }

◆ setPrintMode()

void setPrintMode ( Z3_ast_print_mode  value)
inline

Selects the format used for pretty-printing expressions. Remarks: The default mode for pretty printing expressions is to produce SMT-LIB style output where common subexpressions are printed at each occurrence. The mode is called Z3_PRINT_SMTLIB_FULL. To print shared common subexpressions only once, use the Z3_PRINT_LOW_LEVEL mode. To print in way that conforms to SMT-LIB standards and uses let expressions to share common sub-expressions use Z3_PRINT_SMTLIB_COMPLIANT.

See also
AST::toString
Pattern::toString
FuncDecl::toString
Sort::toString

Definition at line 3205 of file Context.java.

3206 {
3207 Native.setAstPrintMode(nCtx(), value.toInt());
3208 }

◆ SimplifyHelp()

String SimplifyHelp ( )
inline

Return a string describing all available parameters to Expr.Simplify.

Definition at line 4827 of file Context.java.

4828 {
4829 return Native.simplifyGetHelp(nCtx());
4830 }

◆ skip()

Tactic skip ( )
inline

Create a tactic that just returns the given goal.

Definition at line 3450 of file Context.java.

3451 {
3452 return new Tactic(this, Native.tacticSkip(nCtx()));
3453 }

◆ stringToInt()

IntExpr stringToInt ( Expr< SeqSort< CharSort > >  e)
inline

Convert an integer expression to a string.

Definition at line 2423 of file Context.java.

2424 {
2425 return (IntExpr) Expr.create(this, Native.mkStrToInt(nCtx(), e.getNativeObject()));
2426 }

◆ then() [1/2]

Simplifier then ( Simplifier  t1,
Simplifier  t2,
Simplifier...  ts 
)
inline

Create a simplifier that applies t1 and then t2

Remarks: Shorthand for AndThen.

Definition at line 3672 of file Context.java.

3673 {
3674 return andThen(t1, t2, ts);
3675 }
Tactic andThen(Tactic t1, Tactic t2, Tactic... ts)

◆ then() [2/2]

Tactic then ( Tactic  t1,
Tactic  t2,
Tactic...  ts 
)
inline

Create a tactic that applies t1 to a Goal and then t2 to every subgoal produced by t1

Remarks: Shorthand for AndThen.

Definition at line 3377 of file Context.java.

3378 {
3379 return andThen(t1, t2, ts);
3380 }

◆ tryFor()

Tactic tryFor ( Tactic  t,
int  ms 
)
inline

Create a tactic that applies t to a goal for ms milliseconds. Remarks: If t does not terminate within ms milliseconds, then it fails.

Definition at line 3401 of file Context.java.

3402 {
3403 checkContextMatch(t);
3404 return new Tactic(this, Native.tacticTryFor(nCtx(),
3405 t.getNativeObject(), ms));
3406 }

◆ ubvToString()

SeqExpr< CharSort > ubvToString ( Expr< BitVecSort >  e)
inline

Convert an unsigned bitvector expression to a string.

Definition at line 2407 of file Context.java.

2408 {
2409 return (SeqExpr<CharSort>) Expr.create(this, Native.mkUbvToStr(nCtx(), e.getNativeObject()));
2410 }

◆ unwrapAST()

long unwrapAST ( AST  a)
inline

Unwraps an AST. Remarks: This function is used for transitions between native and managed objects. It returns the native pointer to the AST. Note that AST objects are reference counted and unwrapping an AST disables automatic reference counting, i.e., all references to the IntPtr that is returned must be handled externally and through native calls (see e.g.,

See also
Native::incRef
Context::wrapAST
Parameters
aThe AST to unwrap.

Definition at line 4818 of file Context.java.

4819 {
4820 return a.getNativeObject();
4821 }

◆ updateParamValue()

void updateParamValue ( String  id,
String  value 
)
inline

Update a mutable configuration parameter. Remarks: The list of all configuration parameters can be obtained using the Z3 executable: 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.

Definition at line 4848 of file Context.java.

4849 {
4850 Native.updateParamValue(nCtx(), id, value);
4851 }

◆ usingParams() [1/2]

Simplifier usingParams ( Simplifier  t,
Params  p 
)
inline

Create a simplifier that applies t using the given set of parameters p.

Definition at line 3681 of file Context.java.

3682 {
3683 checkContextMatch(t);
3684 checkContextMatch(p);
3685 return new Simplifier(this, Native.simplifierUsingParams(nCtx(),
3686 t.getNativeObject(), p.getNativeObject()));
3687 }

◆ usingParams() [2/2]

Tactic usingParams ( Tactic  t,
Params  p 
)
inline

Create a tactic that applies t using the given set of parameters p.

Definition at line 3487 of file Context.java.

3488 {
3489 checkContextMatch(t);
3490 checkContextMatch(p);
3491 return new Tactic(this, Native.tacticUsingParams(nCtx(),
3492 t.getNativeObject(), p.getNativeObject()));
3493 }

◆ when()

Tactic when ( Probe  p,
Tactic  t 
)
inline

Create a tactic that applies 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.

Definition at line 3414 of file Context.java.

3415 {
3416 checkContextMatch(t);
3417 checkContextMatch(p);
3418 return new Tactic(this, Native.tacticWhen(nCtx(), p.getNativeObject(),
3419 t.getNativeObject()));
3420 }

◆ with() [1/2]

Simplifier with ( Simplifier  t,
Params  p 
)
inline

Create a simplifier that applies t using the given set of parameters p. Remarks: Alias for UsingParams

Definition at line 3695 of file Context.java.

3696 {
3697 return usingParams(t, p);
3698 }
Tactic usingParams(Tactic t, Params p)

◆ with() [2/2]

Tactic with ( Tactic  t,
Params  p 
)
inline

Create a tactic that applies t using the given set of parameters p. Remarks: Alias for UsingParams

Definition at line 3501 of file Context.java.

3502 {
3503 return usingParams(t, p);
3504 }

◆ wrapAST()

AST wrapAST ( long  nativeObject)
inline

Wraps an AST. Remarks: This function is used for transitions between native and managed objects. Note that nativeObject must be a native object obtained from Z3 (e.g., through UnwrapAST) and that it must have a correct reference count.

See also
Native::incRef
Context::unwrapAST
Parameters
nativeObjectThe native pointer to wrap.

Definition at line 4801 of file Context.java.

4802 {
4803 return AST.create(this, nativeObject);
4804 }