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 ()
 
BoolSort mkBoolSort ()
 
CharSort mkCharSort ()
 
SeqSort< CharSortgetStringSort ()
 
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< CharSortmkStringSort ()
 
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)
 
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)
 
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 > 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, BoolSortmkEmptySet (D domain)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkFullSet (D domain)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetAdd (Expr< ArraySort< D, BoolSort > > set, Expr< D > element)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetDel (Expr< ArraySort< D, BoolSort > > set, Expr< D > element)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetUnion (Expr< ArraySort< D, BoolSort > >... args)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetIntersection (Expr< ArraySort< D, BoolSort > >... args)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetDifference (Expr< ArraySort< D, BoolSort > > arg1, Expr< ArraySort< D, BoolSort > > arg2)
 
final< D extends Sort > ArrayExpr< D, BoolSortmkSetComplement (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< R extends Sort > SeqExpr< R > mkEmptySeq (R s)
 
final< R extends Sort > SeqExpr< R > mkUnit (Expr< R > elem)
 
SeqExpr< CharSortmkString (String s)
 
SeqExpr< CharSortintToString (Expr< IntSort > e)
 
SeqExpr< CharSortubvToString (Expr< BitVecSort > e)
 
SeqExpr< CharSortsbvToString (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 > 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< CharSortcharFromBv (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 ()
 
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 signed)
 
FPExpr mkFPToFP (FPSort s, Expr< FPRMSort > rm, Expr< FPSort > t)
 
BitVecExpr mkFPToBV (Expr< FPRMSort > rm, Expr< FPSort > t, int sz, boolean signed)
 
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< BoolSortmkLinearOrder (R sort, int index)
 
final< R extends Sort > FuncDecl< BoolSortmkPartialOrder (R sort, int index)
 
final< R extends Sort > FuncDecl< BoolSortmkTransitiveClosure (FuncDecl< BoolSort > f)
 
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:5013

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 654 of file Context.java.

655 {
656 checkContextMatch(f);
657 checkContextMatch(args);
658 checkContextMatch(body);
659 long[] argsNative = AST.arrayToNative(args);
660 Native.addRecDef(nCtx(), f.getNativeObject(), args.length, argsNative, body.getNativeObject());
661 }

◆ 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 3517 of file Context.java.

3518 {
3519 checkContextMatch(p1);
3520 checkContextMatch(p2);
3521 return new Probe(this, Native.probeAnd(nCtx(), p1.getNativeObject(),
3522 p2.getNativeObject()));
3523 }

◆ andThen() [1/2]

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

Create a simplifier that applies t1 and then t1

Definition at line 3347 of file Context.java.

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

◆ 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 3113 of file Context.java.

3115 {
3116 checkContextMatch(t1);
3117 checkContextMatch(t2);
3118 checkContextMatch(ts);
3119
3120 long last = 0;
3121 if (ts != null && ts.length > 0)
3122 {
3123 last = ts[ts.length - 1].getNativeObject();
3124 for (int i = ts.length - 2; i >= 0; i--) {
3125 last = Native.tacticAndThen(nCtx(), ts[i].getNativeObject(),
3126 last);
3127 }
3128 }
3129 if (last != 0)
3130 {
3131 last = Native.tacticAndThen(nCtx(), t2.getNativeObject(), last);
3132 return new Tactic(this, Native.tacticAndThen(nCtx(),
3133 t1.getNativeObject(), last));
3134 } else
3135 return new Tactic(this, Native.tacticAndThen(nCtx(),
3136 t1.getNativeObject(), t2.getNativeObject()));
3137 }

◆ 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 2991 of file Context.java.

2994 {
2995
2996 return Native.benchmarkToSmtlibString(nCtx(), name, logic, status,
2997 attributes, assumptions.length,
2998 AST.arrayToNative(assumptions), formula.getNativeObject());
2999 }

◆ charFromBv()

Expr< CharSort > charFromBv ( BitVecExpr  bv)
inline

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

Definition at line 2583 of file Context.java.

2584 {
2585 checkContextMatch(bv);
2586 return (Expr<CharSort>) Expr.create(this, Native.mkCharFromBv(nCtx(), bv.getNativeObject()));
2587 }

◆ charToBv()

BitVecExpr charToBv ( Expr< CharSort ch)
inline

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

Definition at line 2574 of file Context.java.

2575 {
2576 checkContextMatch(ch);
2577 return (BitVecExpr) Expr.create(this, Native.mkCharToBv(nCtx(), ch.getNativeObject()));
2578 }

◆ charToInt()

IntExpr charToInt ( Expr< CharSort ch)
inline

Create an integer (code point) from character.

Definition at line 2565 of file Context.java.

2566 {
2567 checkContextMatch(ch);
2568 return (IntExpr) Expr.create(this, Native.mkCharToInt(nCtx(), ch.getNativeObject()));
2569 }

◆ close()

void close ( )
inline

Disposes of the context.

Definition at line 4578 of file Context.java.

4579 {
4580 if (m_ctx == 0)
4581 return;
4582
4583 m_RefQueue.forceClear();
4584
4585 m_boolSort = null;
4586 m_intSort = null;
4587 m_realSort = null;
4588 m_stringSort = null;
4589 m_RefQueue = null;
4590
4591 synchronized (creation_lock) {
4592 Native.delContext(m_ctx);
4593 }
4594 m_ctx = 0;
4595 }

◆ 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 3195 of file Context.java.

3196 {
3197 checkContextMatch(p);
3198 checkContextMatch(t1);
3199 checkContextMatch(t2);
3200 return new Tactic(this, Native.tacticCond(nCtx(), p.getNativeObject(),
3201 t1.getNativeObject(), t2.getNativeObject()));
3202 }

◆ constProbe()

Probe constProbe ( double  val)
inline

Create a probe that always evaluates to val.

Definition at line 3447 of file Context.java.

3448 {
3449 return new Probe(this, Native.probeConst(nCtx(), val));
3450 }

◆ 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 3506 of file Context.java.

3507 {
3508 checkContextMatch(p1);
3509 checkContextMatch(p2);
3510 return new Probe(this, Native.probeEq(nCtx(), p1.getNativeObject(),
3511 p2.getNativeObject()));
3512 }

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

◆ fail()

Tactic fail ( )
inline

Create a tactic always fails.

Definition at line 3226 of file Context.java.

3227 {
3228 return new Tactic(this, Native.tacticFail(nCtx()));
3229 }

◆ failIf()

Tactic failIf ( Probe  p)
inline

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

Definition at line 3235 of file Context.java.

3236 {
3237 checkContextMatch(p);
3238 return new Tactic(this,
3239 Native.tacticFailIf(nCtx(), p.getNativeObject()));
3240 }

◆ 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 3246 of file Context.java.

3247 {
3248 return new Tactic(this, Native.tacticFailIfNotDecided(nCtx()));
3249 }

◆ 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 3494 of file Context.java.

3495 {
3496 checkContextMatch(p1);
3497 checkContextMatch(p2);
3498 return new Probe(this, Native.probeGe(nCtx(), p1.getNativeObject(),
3499 p2.getNativeObject()));
3500 }

◆ getBoolSort()

BoolSort getBoolSort ( )
inline

Retrieves the Boolean sort of the context.

Definition at line 128 of file Context.java.

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

◆ getIntSort()

IntSort getIntSort ( )
inline

Retrieves the Integer sort of the context.

Definition at line 139 of file Context.java.

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

◆ getNumProbes()

int getNumProbes ( )
inline

The number of supported Probes.

Definition at line 3409 of file Context.java.

3410 {
3411 return Native.getNumProbes(nCtx());
3412 }

◆ getNumSimplifiers()

int getNumSimplifiers ( )
inline

The number of supported simplifiers.

Definition at line 3309 of file Context.java.

3310 {
3311 return Native.getNumSimplifiers(nCtx());
3312 }

◆ getNumTactics()

int getNumTactics ( )
inline

The number of supported tactics.

Definition at line 3074 of file Context.java.

3075 {
3076 return Native.getNumTactics(nCtx());
3077 }

◆ getProbeDescription()

String getProbeDescription ( String  name)
inline

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

Definition at line 3431 of file Context.java.

3432 {
3433 return Native.probeGetDescr(nCtx(), name);
3434 }

◆ getProbeNames()

String[] getProbeNames ( )
inline

The names of all supported Probes.

Definition at line 3417 of file Context.java.

3418 {
3419
3420 int n = getNumProbes();
3421 String[] res = new String[n];
3422 for (int i = 0; i < n; i++)
3423 res[i] = Native.getProbeName(nCtx(), i);
3424 return res;
3425 }
String(name, ctx=None)
Definition z3py.py:11344

◆ getRealSort()

RealSort getRealSort ( )
inline

Retrieves the Real sort of the context.

Definition at line 150 of file Context.java.

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

◆ getSimplifierDescription()

String getSimplifierDescription ( String  name)
inline

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

Definition at line 3331 of file Context.java.

3332 {
3333 return Native.simplifierGetDescr(nCtx(), name);
3334 }

◆ getSimplifierNames()

String[] getSimplifierNames ( )
inline

The names of all supported simplifiers.

Definition at line 3317 of file Context.java.

3318 {
3319
3320 int n = getNumSimplifiers();
3321 String[] res = new String[n];
3322 for (int i = 0; i < n; i++)
3323 res[i] = Native.getSimplifierName(nCtx(), i);
3324 return res;
3325 }

◆ getSimplifyParameterDescriptions()

ParamDescrs getSimplifyParameterDescriptions ( )
inline

Retrieves parameter descriptions for simplifier.

Definition at line 4509 of file Context.java.

4510 {
4511 return new ParamDescrs(this, Native.simplifyGetParamDescrs(nCtx()));
4512 }

◆ getStringSort()

SeqSort< CharSort > getStringSort ( )
inline

Retrieves the String sort of the context.

Definition at line 178 of file Context.java.

179 {
180 if (m_stringSort == null) {
181 m_stringSort = mkStringSort();
182 }
183 return m_stringSort;
184 }
SeqSort< CharSort > mkStringSort()
Definition Context.java:251

◆ getTacticDescription()

String getTacticDescription ( String  name)
inline

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

Definition at line 3096 of file Context.java.

3097 {
3098 return Native.tacticGetDescr(nCtx(), name);
3099 }

◆ getTacticNames()

String[] getTacticNames ( )
inline

The names of all supported tactics.

Definition at line 3082 of file Context.java.

3083 {
3084
3085 int n = getNumTactics();
3086 String[] res = new String[n];
3087 for (int i = 0; i < n; i++)
3088 res[i] = Native.getTacticName(nCtx(), i);
3089 return res;
3090 }

◆ 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 3468 of file Context.java.

3469 {
3470 checkContextMatch(p1);
3471 checkContextMatch(p2);
3472 return new Probe(this, Native.probeGt(nCtx(), p1.getNativeObject(),
3473 p2.getNativeObject()));
3474 }

◆ 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 3301 of file Context.java.

3302 {
3303 Native.interrupt(nCtx());
3304 }

◆ intToString()

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

Convert an integer expression to a string.

Definition at line 2178 of file Context.java.

2179 {
2180 return (SeqExpr<CharSort>) Expr.create(this, Native.mkIntToStr(nCtx(), e.getNativeObject()));
2181 }

◆ 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 3481 of file Context.java.

3482 {
3483 checkContextMatch(p1);
3484 checkContextMatch(p2);
3485 return new Probe(this, Native.probeLe(nCtx(), p1.getNativeObject(),
3486 p2.getNativeObject()));
3487 }

◆ 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 3456 of file Context.java.

3457 {
3458 checkContextMatch(p1);
3459 checkContextMatch(p2);
3460 return new Probe(this, Native.probeLt(nCtx(), p1.getNativeObject(),
3461 p2.getNativeObject()));
3462 }

◆ mkAdd()

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

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

Definition at line 983 of file Context.java.

984 {
985 checkContextMatch(t);
986 return (ArithExpr<R>) Expr.create(this,
987 Native.mkAdd(nCtx(), t.length, AST.arrayToNative(t)));
988 }

◆ 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 2539 of file Context.java.

2540 {
2541 return (ReExpr<R>) Expr.create(this, Native.mkReAllchar(nCtx(), s.getNativeObject()));
2542 }

◆ mkAnd()

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

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

Definition at line 961 of file Context.java.

962 {
963 checkContextMatch(t);
964 return new BoolExpr(this, Native.mkAnd(nCtx(), t.length,
965 AST.arrayToNative(t)));
966 }

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 846 of file Context.java.

847 {
848 checkContextMatch(f);
849 checkContextMatch(args);
850 return Expr.create(this, f, args);
851 }

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

◆ mkArrayConst() [1/2]

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

Create an array constant.

Definition at line 1850 of file Context.java.

1852 {
1853 return (ArrayExpr<D, R>) mkConst(mkSymbol(name), mkArraySort(domain, range));
1854 }
final< D extends Sort, R extends Sort > ArraySort< D, R > mkArraySort(D domain, R range)
Definition Context.java:230
final< R extends Sort > Expr< R > mkConst(Symbol name, R range)
Definition Context.java:738
IntSymbol mkSymbol(int i)
Definition Context.java:94

◆ mkArrayConst() [2/2]

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

Create an array constant.

Definition at line 1841 of file Context.java.

1843 {
1844 return (ArrayExpr<D, R>) mkConst(name, mkArraySort(domain, range));
1845 }

◆ 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 2005 of file Context.java.

2006 {
2007 checkContextMatch(arg1);
2008 checkContextMatch(arg2);
2009 return (Expr<D>) Expr.create(this, Native.mkArrayExt(nCtx(), arg1.getNativeObject(), arg2.getNativeObject()));
2010 }

◆ mkArraySort() [1/2]

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

Create a new array sort.

Definition at line 230 of file Context.java.

231 {
232 checkContextMatch(domain);
233 checkContextMatch(range);
234 return new ArraySort<>(this, domain, range);
235 }

◆ mkArraySort() [2/2]

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

Create a new array sort.

Definition at line 241 of file Context.java.

242 {
243 checkContextMatch(domains);
244 checkContextMatch(range);
245 return new ArraySort<>(this, domains, range);
246 }

◆ 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 2277 of file Context.java.

2278 {
2279 checkContextMatch(s, index);
2280 return (SeqExpr<R>) Expr.create(this, Native.mkSeqAt(nCtx(), s.getNativeObject(), index.getNativeObject()));
2281 }

◆ mkAtLeast()

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

Create an at-least-k constraint.

Definition at line 2610 of file Context.java.

2611 {
2612 checkContextMatch(args);
2613 return (BoolExpr) Expr.create(this, Native.mkAtleast(nCtx(), args.length, AST.arrayToNative(args), k));
2614 }

◆ mkAtMost()

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

Create an at-most-k constraint.

Definition at line 2601 of file Context.java.

2602 {
2603 checkContextMatch(args);
2604 return (BoolExpr) Expr.create(this, Native.mkAtmost(nCtx(), args.length, AST.arrayToNative(args), k));
2605 }

◆ mkBitVecSort()

BitVecSort mkBitVecSort ( int  size)
inline

Create a new bit-vector sort.

Definition at line 222 of file Context.java.

223 {
224 return new BitVecSort(this, Native.mkBvSort(nCtx(), size));
225 }
BitVecSort(sz, ctx=None)
Definition z3py.py:4172

◆ mkBool()

BoolExpr mkBool ( boolean  value)
inline

Creates a Boolean value.

Definition at line 872 of file Context.java.

873 {
874 return value ? mkTrue() : mkFalse();
875 }

Referenced by UserPropagatorBase.conflict().

◆ mkBoolConst() [1/2]

BoolExpr mkBoolConst ( String  name)
inline

Create a Boolean constant.

Definition at line 789 of file Context.java.

790 {
791 return (BoolExpr) mkConst(mkSymbol(name), getBoolSort());
792 }

◆ mkBoolConst() [2/2]

BoolExpr mkBoolConst ( Symbol  name)
inline

Create a Boolean constant.

Definition at line 781 of file Context.java.

782 {
783 return (BoolExpr) mkConst(name, getBoolSort());
784 }

◆ mkBoolSort()

BoolSort mkBoolSort ( )
inline

Create a new Boolean sort.

Definition at line 161 of file Context.java.

162 {
163 return new BoolSort(this);
164 }

◆ mkBound()

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

Creates a new bound variable.

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

Definition at line 714 of file Context.java.

715 {
716 return (Expr<R>) Expr.create(this,
717 Native.mkBound(nCtx(), index, ty.getNativeObject()));
718 }

◆ 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 2803 of file Context.java.

2804 {
2805 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
2806 }
final< R extends Sort > Expr< R > mkNumeral(String v, R ty)
BitVecSort mkBitVecSort(int size)
Definition Context.java:222

◆ 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 2813 of file Context.java.

2814 {
2815 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
2816 }

◆ 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 2793 of file Context.java.

2794 {
2795 return (BitVecNum) mkNumeral(v, mkBitVecSort(size));
2796 }

◆ 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 1721 of file Context.java.

1722 {
1723 checkContextMatch(t);
1724 return new IntExpr(this, Native.mkBv2int(nCtx(), t.getNativeObject(),
1725 (signed)));
1726 }

◆ 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 1284 of file Context.java.

1285 {
1286 checkContextMatch(t1);
1287 checkContextMatch(t2);
1288 return new BitVecExpr(this, Native.mkBvadd(nCtx(),
1289 t1.getNativeObject(), t2.getNativeObject()));
1290 }

◆ 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 1733 of file Context.java.

1735 {
1736 checkContextMatch(t1);
1737 checkContextMatch(t2);
1738 return new BoolExpr(this, Native.mkBvaddNoOverflow(nCtx(), t1
1739 .getNativeObject(), t2.getNativeObject(), (isSigned)));
1740 }

◆ 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 1747 of file Context.java.

1749 {
1750 checkContextMatch(t1);
1751 checkContextMatch(t2);
1752 return new BoolExpr(this, Native.mkBvaddNoUnderflow(nCtx(),
1753 t1.getNativeObject(), t2.getNativeObject()));
1754 }

◆ mkBVAND()

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

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

Definition at line 1195 of file Context.java.

1196 {
1197 checkContextMatch(t1);
1198 checkContextMatch(t2);
1199 return new BitVecExpr(this, Native.mkBvand(nCtx(),
1200 t1.getNativeObject(), t2.getNativeObject()));
1201 }

◆ 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 1629 of file Context.java.

1630 {
1631 checkContextMatch(t1);
1632 checkContextMatch(t2);
1633 return new BitVecExpr(this, Native.mkBvashr(nCtx(),
1634 t1.getNativeObject(), t2.getNativeObject()));
1635 }

◆ mkBVConst() [1/2]

BitVecExpr mkBVConst ( String  name,
int  size 
)
inline

Creates a bit-vector constant.

Definition at line 837 of file Context.java.

838 {
839 return (BitVecExpr) mkConst(name, mkBitVecSort(size));
840 }

◆ mkBVConst() [2/2]

BitVecExpr mkBVConst ( Symbol  name,
int  size 
)
inline

Creates a bit-vector constant.

Definition at line 829 of file Context.java.

830 {
831 return (BitVecExpr) mkConst(name, mkBitVecSort(size));
832 }

◆ 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 1609 of file Context.java.

1610 {
1611 checkContextMatch(t1);
1612 checkContextMatch(t2);
1613 return new BitVecExpr(this, Native.mkBvlshr(nCtx(),
1614 t1.getNativeObject(), t2.getNativeObject()));
1615 }

◆ 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 1310 of file Context.java.

1311 {
1312 checkContextMatch(t1);
1313 checkContextMatch(t2);
1314 return new BitVecExpr(this, Native.mkBvmul(nCtx(),
1315 t1.getNativeObject(), t2.getNativeObject()));
1316 }

◆ 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 1815 of file Context.java.

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

◆ 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 1829 of file Context.java.

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

◆ mkBVNAND()

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

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

Definition at line 1234 of file Context.java.

1235 {
1236 checkContextMatch(t1);
1237 checkContextMatch(t2);
1238 return new BitVecExpr(this, Native.mkBvnand(nCtx(),
1239 t1.getNativeObject(), t2.getNativeObject()));
1240 }

◆ 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 1273 of file Context.java.

1274 {
1275 checkContextMatch(t);
1276 return new BitVecExpr(this, Native.mkBvneg(nCtx(), t.getNativeObject()));
1277 }

◆ 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 1803 of file Context.java.

1804 {
1805 checkContextMatch(t);
1806 return new BoolExpr(this, Native.mkBvnegNoOverflow(nCtx(),
1807 t.getNativeObject()));
1808 }

◆ mkBVNOR()

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

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

Definition at line 1247 of file Context.java.

1248 {
1249 checkContextMatch(t1);
1250 checkContextMatch(t2);
1251 return new BitVecExpr(this, Native.mkBvnor(nCtx(),
1252 t1.getNativeObject(), t2.getNativeObject()));
1253 }

◆ mkBVNot()

BitVecExpr mkBVNot ( Expr< BitVecSort t)
inline

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

Definition at line 1160 of file Context.java.

1161 {
1162 checkContextMatch(t);
1163 return new BitVecExpr(this, Native.mkBvnot(nCtx(), t.getNativeObject()));
1164 }

◆ mkBVOR()

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

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

Definition at line 1208 of file Context.java.

1209 {
1210 checkContextMatch(t1);
1211 checkContextMatch(t2);
1212 return new BitVecExpr(this, Native.mkBvor(nCtx(), t1.getNativeObject(),
1213 t2.getNativeObject()));
1214 }

◆ 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 1171 of file Context.java.

1172 {
1173 checkContextMatch(t);
1174 return new BitVecExpr(this, Native.mkBvredand(nCtx(),
1175 t.getNativeObject()));
1176 }

◆ 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 1183 of file Context.java.

1184 {
1185 checkContextMatch(t);
1186 return new BitVecExpr(this, Native.mkBvredor(nCtx(),
1187 t.getNativeObject()));
1188 }

◆ 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 1667 of file Context.java.

1669 {
1670 checkContextMatch(t1);
1671 checkContextMatch(t2);
1672 return new BitVecExpr(this, Native.mkExtRotateLeft(nCtx(),
1673 t1.getNativeObject(), t2.getNativeObject()));
1674 }

◆ 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 1642 of file Context.java.

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

◆ 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 1682 of file Context.java.

1684 {
1685 checkContextMatch(t1);
1686 checkContextMatch(t2);
1687 return new BitVecExpr(this, Native.mkExtRotateRight(nCtx(),
1688 t1.getNativeObject(), t2.getNativeObject()));
1689 }

◆ 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 1654 of file Context.java.

1655 {
1656 checkContextMatch(t);
1657 return new BitVecExpr(this, Native.mkRotateRight(nCtx(), i,
1658 t.getNativeObject()));
1659 }

◆ 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 1346 of file Context.java.

1347 {
1348 checkContextMatch(t1);
1349 checkContextMatch(t2);
1350 return new BitVecExpr(this, Native.mkBvsdiv(nCtx(),
1351 t1.getNativeObject(), t2.getNativeObject()));
1352 }

◆ 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 1789 of file Context.java.

1791 {
1792 checkContextMatch(t1);
1793 checkContextMatch(t2);
1794 return new BoolExpr(this, Native.mkBvsdivNoOverflow(nCtx(),
1795 t1.getNativeObject(), t2.getNativeObject()));
1796 }

◆ 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 1471 of file Context.java.

1472 {
1473 checkContextMatch(t1);
1474 checkContextMatch(t2);
1475 return new BoolExpr(this, Native.mkBvsge(nCtx(), t1.getNativeObject(),
1476 t2.getNativeObject()));
1477 }

◆ 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 1497 of file Context.java.

1498 {
1499 checkContextMatch(t1);
1500 checkContextMatch(t2);
1501 return new BoolExpr(this, Native.mkBvsgt(nCtx(), t1.getNativeObject(),
1502 t2.getNativeObject()));
1503 }

◆ 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 1590 of file Context.java.

1591 {
1592 checkContextMatch(t1);
1593 checkContextMatch(t2);
1594 return new BitVecExpr(this, Native.mkBvshl(nCtx(),
1595 t1.getNativeObject(), t2.getNativeObject()));
1596 }

◆ 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 1445 of file Context.java.

1446 {
1447 checkContextMatch(t1);
1448 checkContextMatch(t2);
1449 return new BoolExpr(this, Native.mkBvsle(nCtx(), t1.getNativeObject(),
1450 t2.getNativeObject()));
1451 }

◆ 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 1419 of file Context.java.

1420 {
1421 checkContextMatch(t1);
1422 checkContextMatch(t2);
1423 return new BoolExpr(this, Native.mkBvslt(nCtx(), t1.getNativeObject(),
1424 t2.getNativeObject()));
1425 }

◆ 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 1393 of file Context.java.

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

◆ 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 1379 of file Context.java.

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

◆ 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 1297 of file Context.java.

1298 {
1299 checkContextMatch(t1);
1300 checkContextMatch(t2);
1301 return new BitVecExpr(this, Native.mkBvsub(nCtx(),
1302 t1.getNativeObject(), t2.getNativeObject()));
1303 }

◆ 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 1761 of file Context.java.

1763 {
1764 checkContextMatch(t1);
1765 checkContextMatch(t2);
1766 return new BoolExpr(this, Native.mkBvsubNoOverflow(nCtx(),
1767 t1.getNativeObject(), t2.getNativeObject()));
1768 }

◆ 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 1775 of file Context.java.

1777 {
1778 checkContextMatch(t1);
1779 checkContextMatch(t2);
1780 return new BoolExpr(this, Native.mkBvsubNoUnderflow(nCtx(), t1
1781 .getNativeObject(), t2.getNativeObject(), (isSigned)));
1782 }

◆ 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 1325 of file Context.java.

1326 {
1327 checkContextMatch(t1);
1328 checkContextMatch(t2);
1329 return new BitVecExpr(this, Native.mkBvudiv(nCtx(),
1330 t1.getNativeObject(), t2.getNativeObject()));
1331 }

◆ 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 1458 of file Context.java.

1459 {
1460 checkContextMatch(t1);
1461 checkContextMatch(t2);
1462 return new BoolExpr(this, Native.mkBvuge(nCtx(), t1.getNativeObject(),
1463 t2.getNativeObject()));
1464 }

◆ 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 1484 of file Context.java.

1485 {
1486 checkContextMatch(t1);
1487 checkContextMatch(t2);
1488 return new BoolExpr(this, Native.mkBvugt(nCtx(), t1.getNativeObject(),
1489 t2.getNativeObject()));
1490 }

◆ 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 1432 of file Context.java.

1433 {
1434 checkContextMatch(t1);
1435 checkContextMatch(t2);
1436 return new BoolExpr(this, Native.mkBvule(nCtx(), t1.getNativeObject(),
1437 t2.getNativeObject()));
1438 }

◆ 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 1406 of file Context.java.

1407 {
1408 checkContextMatch(t1);
1409 checkContextMatch(t2);
1410 return new BoolExpr(this, Native.mkBvult(nCtx(), t1.getNativeObject(),
1411 t2.getNativeObject()));
1412 }

◆ 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 1361 of file Context.java.

1362 {
1363 checkContextMatch(t1);
1364 checkContextMatch(t2);
1365 return new BitVecExpr(this, Native.mkBvurem(nCtx(),
1366 t1.getNativeObject(), t2.getNativeObject()));
1367 }

◆ mkBVXNOR()

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

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

Definition at line 1260 of file Context.java.

1261 {
1262 checkContextMatch(t1);
1263 checkContextMatch(t2);
1264 return new BitVecExpr(this, Native.mkBvxnor(nCtx(),
1265 t1.getNativeObject(), t2.getNativeObject()));
1266 }

◆ mkBVXOR()

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

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

Definition at line 1221 of file Context.java.

1222 {
1223 checkContextMatch(t1);
1224 checkContextMatch(t2);
1225 return new BitVecExpr(this, Native.mkBvxor(nCtx(),
1226 t1.getNativeObject(), t2.getNativeObject()));
1227 }

◆ mkCharLe()

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

Create less than or equal to between two characters.

Definition at line 2556 of file Context.java.

2557 {
2558 checkContextMatch(ch1, ch2);
2559 return (BoolExpr) Expr.create(this, Native.mkCharLe(nCtx(), ch1.getNativeObject(), ch2.getNativeObject()));
2560 }

◆ mkCharSort()

CharSort mkCharSort ( )
inline

Creates character sort object.

Definition at line 170 of file Context.java.

171 {
172 return new CharSort(this);
173 }
CharSort(ctx=None)
Definition z3py.py:11168

◆ mkComplement()

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

Create the complement regular expression.

Definition at line 2470 of file Context.java.

2471 {
2472 checkContextMatch(re);
2473 return (ReExpr<R>) Expr.create(this, Native.mkReComplement(nCtx(), re.getNativeObject()));
2474 }

◆ 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 1515 of file Context.java.

1516 {
1517 checkContextMatch(t1);
1518 checkContextMatch(t2);
1519 return new BitVecExpr(this, Native.mkConcat(nCtx(),
1520 t1.getNativeObject(), t2.getNativeObject()));
1521 }

◆ mkConcat() [2/3]

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

Concatenate sequences.

Definition at line 2211 of file Context.java.

2212 {
2213 checkContextMatch(t);
2214 return (SeqExpr<R>) Expr.create(this, Native.mkSeqConcat(nCtx(), t.length, AST.arrayToNative(t)));
2215 }

◆ mkConcat() [3/3]

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

Create the concatenation of regular languages.

Definition at line 2480 of file Context.java.

2481 {
2482 checkContextMatch(t);
2483 return (ReExpr<R>) Expr.create(this, Native.mkReConcat(nCtx(), t.length, AST.arrayToNative(t)));
2484 }

◆ 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 773 of file Context.java.

774 {
775 return mkApp(f, (Expr<?>[]) null);
776 }
final< R extends Sort > Expr< R > mkApp(FuncDecl< R > f, Expr<?>... args)
Definition Context.java:846

◆ mkConst() [2/3]

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

Creates a new Constant of sort range and named name.

Definition at line 753 of file Context.java.

754 {
755 return mkConst(mkSymbol(name), range);
756 }

◆ mkConst() [3/3]

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

Creates a new Constant of sort range and named name.

Definition at line 738 of file Context.java.

739 {
740 checkContextMatch(name);
741 checkContextMatch(range);
742
743 return (Expr<R>) Expr.create(
744 this,
745 Native.mkConst(nCtx(), name.getNativeObject(),
746 range.getNativeObject()));
747 }
expr range(expr const &lo, expr const &hi)
Definition z3++.h:4343

◆ mkConstArray()

final< D extends Sort, R extends Sort > ArrayExpr< D, R > mkConstArray ( 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
#mkArraySort(Sort[], R)
#mkSelect(Expr<ArraySort<D, R>> a, Expr<D> i)

Definition at line 1958 of file Context.java.

1959 {
1960 checkContextMatch(domain);
1961 checkContextMatch(v);
1962 return new ArrayExpr<>(this, Native.mkConstArray(nCtx(),
1963 domain.getNativeObject(), v.getNativeObject()));
1964 }

◆ mkConstDecl() [1/2]

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

Creates a new constant function declaration.

Definition at line 690 of file Context.java.

691 {
692 checkContextMatch(range);
693 return new FuncDecl<>(this, mkSymbol(name), null, range);
694 }

◆ mkConstDecl() [2/2]

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

Creates a new constant function declaration.

Definition at line 680 of file Context.java.

681 {
682 checkContextMatch(name);
683 checkContextMatch(range);
684 return new FuncDecl<>(this, name, null, range);
685 }

◆ 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 365 of file Context.java.

367 {
368 return of(this, mkSymbol(name), mkSymbol(recognizer), mkSymbols(fieldNames), sorts, sortRefs);
369 }

◆ 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 355 of file Context.java.

358 {
359 return of(this, name, recognizer, fieldNames, sorts, sortRefs);
360 }

◆ 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 2248 of file Context.java.

2249 {
2250 checkContextMatch(s1, s2);
2251 return (BoolExpr) Expr.create(this, Native.mkSeqContains(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2252 }

◆ mkDatatypeSort() [1/2]

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

Create a new datatype sort.

Definition at line 384 of file Context.java.

386 {
387 checkContextMatch(constructors);
388 return new DatatypeSort<>(this, mkSymbol(name), constructors);
389 }

◆ mkDatatypeSort() [2/2]

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

Create a new datatype sort.

Definition at line 374 of file Context.java.

375 {
376 checkContextMatch(name);
377 checkContextMatch(constructors);
378 return new DatatypeSort<>(this, name, constructors);
379 }

◆ mkDatatypeSorts() [1/2]

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

Create mutually recursive data-types.

Definition at line 470 of file Context.java.

472 {
473 return mkDatatypeSorts(mkSymbols(names), c);
474 }
DatatypeSort< Object >[] mkDatatypeSorts(Symbol[] names, Constructor< Object >[][] c)
Definition Context.java:444

◆ 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 444 of file Context.java.

445 {
446 checkContextMatch(names);
447 int n = names.length;
448 ConstructorList<Object>[] cla = new ConstructorList[n];
449 long[] n_constr = new long[n];
450 for (int i = 0; i < n; i++)
451 {
452 Constructor<Object>[] constructor = c[i];
453
454 checkContextMatch(constructor);
455 cla[i] = new ConstructorList<>(this, constructor);
456 n_constr[i] = cla[i].getNativeObject();
457 }
458 long[] n_res = new long[n];
459 Native.mkDatatypes(nCtx(), n, Symbol.arrayToNative(names), n_res,
460 n_constr);
461 DatatypeSort<Object>[] res = new DatatypeSort[n];
462 for (int i = 0; i < n; i++)
463 res[i] = new DatatypeSort<>(this, n_res[i]);
464 return res;
465 }
DatatypeSort(name, params=None, ctx=None)
Definition z3py.py:5567

◆ 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 2509 of file Context.java.

2510 {
2511 checkContextMatch(a, b);
2512 return (ReExpr<R>) Expr.create(this, Native.mkReDiff(nCtx(), a.getNativeObject(), b.getNativeObject()));
2513 }

◆ mkDistinct()

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

Creates a distinct term.

Definition at line 892 of file Context.java.

893 {
894 checkContextMatch(args);
895 return new BoolExpr(this, Native.mkDistinct(nCtx(), args.length,
896 AST.arrayToNative(args)));
897 }

◆ 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 1025 of file Context.java.

1026 {
1027 checkContextMatch(t1);
1028 checkContextMatch(t2);
1029 return (ArithExpr<R>) Expr.create(this, Native.mkDiv(nCtx(),
1030 t1.getNativeObject(), t2.getNativeObject()));
1031 }

◆ mkEmptyRe()

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

Create the empty regular expression. Corresponds to re.none

Definition at line 2520 of file Context.java.

2521 {
2522 return (ReExpr<R>) Expr.create(this, Native.mkReEmpty(nCtx(), s.getNativeObject()));
2523 }

◆ mkEmptySeq()

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

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

Definition at line 2144 of file Context.java.

2145 {
2146 checkContextMatch(s);
2147 return (SeqExpr<R>) Expr.create(this, Native.mkSeqEmpty(nCtx(), s.getNativeObject()));
2148 }

◆ mkEmptySet()

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

Create an empty set.

Definition at line 2025 of file Context.java.

2026 {
2027 checkContextMatch(domain);
2028 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2029 Native.mkEmptySet(nCtx(), domain.getNativeObject()));
2030 }

◆ mkEnumSort() [1/2]

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

Create a new enumeration sort.

Definition at line 300 of file Context.java.

302 {
303 return new EnumSort<>(this, mkSymbol(name), mkSymbols(enumNames));
304 }

◆ mkEnumSort() [2/2]

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

Create a new enumeration sort.

Definition at line 289 of file Context.java.

291 {
292 checkContextMatch(name);
293 checkContextMatch(enumNames);
294 return new EnumSort<>(this, name, enumNames);
295 }

◆ mkEq()

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

Creates the equality x = y

Definition at line 880 of file Context.java.

881 {
882 checkContextMatch(x);
883 checkContextMatch(y);
884 return new BoolExpr(this, Native.mkEq(nCtx(), x.getNativeObject(),
885 y.getNativeObject()));
886 }

◆ 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
#mkForall(Sort[],Symbol[],Expr<BoolSort>,int,Pattern[],Expr<?>[],Symbol,Symbol)

Definition at line 2881 of file Context.java.

2884 {
2885
2886 return Quantifier.of(this, false, boundConstants, body, weight,
2887 patterns, noPatterns, quantifierID, skolemID);
2888 }

◆ 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
#mkForall(Sort[],Symbol[],Expr<BoolSort>,int,Pattern[],Expr<?>[],Symbol,Symbol)

Definition at line 2868 of file Context.java.

2871 {
2872
2873 return Quantifier.of(this, false, sorts, names, body, weight,
2874 patterns, noPatterns, quantifierID, skolemID);
2875 }

◆ 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 2296 of file Context.java.

2297 {
2298 checkContextMatch(s, offset, length);
2299 return (SeqExpr<R>) Expr.create(this, Native.mkSeqExtract(nCtx(), s.getNativeObject(), offset.getNativeObject(), length.getNativeObject()));
2300 }

◆ 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 1531 of file Context.java.

1533 {
1534 checkContextMatch(t);
1535 return new BitVecExpr(this, Native.mkExtract(nCtx(), high, low,
1536 t.getNativeObject()));
1537 }

◆ mkFalse()

BoolExpr mkFalse ( )
inline

The false Term.

Definition at line 864 of file Context.java.

865 {
866 return new BoolExpr(this, Native.mkFalse(nCtx()));
867 }

◆ mkFiniteDomainSort() [1/2]

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

Create a new finite domain sort.

Definition at line 338 of file Context.java.

340 {
341 return new FiniteDomainSort<>(this, mkSymbol(name), size);
342 }

◆ mkFiniteDomainSort() [2/2]

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

Create a new finite domain sort.

Definition at line 328 of file Context.java.

330 {
331 checkContextMatch(name);
332 return new FiniteDomainSort<>(this, name, size);
333 }

◆ mkFixedpoint()

Fixedpoint mkFixedpoint ( )
inline

Create a Fixedpoint context.

Definition at line 3615 of file Context.java.

3616 {
3617 return new Fixedpoint(this);
3618 }

◆ 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
#mkForall(Sort[],Symbol[],Expr<BoolSort>,int,Pattern[],Expr<?>[],Symbol,Symbol)

Definition at line 2855 of file Context.java.

2858 {
2859
2860 return Quantifier.of(this, true, boundConstants, body, weight,
2861 patterns, noPatterns, quantifierID, skolemID);
2862 }

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

Definition at line 2843 of file Context.java.

2846 {
2847 return Quantifier.of(this, true, sorts, names, body, weight, patterns,
2848 noPatterns, quantifierID, skolemID);
2849 }

◆ 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 3945 of file Context.java.

3946 {
3947 return mkFPNumeral(sgn, exp, sig, s);
3948 }
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 3958 of file Context.java.

3959 {
3960 return mkFPNumeral(sgn, exp, sig, s);
3961 }

◆ 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 3920 of file Context.java.

3921 {
3922 return mkFPNumeral(v, s);
3923 }

◆ 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 4243 of file Context.java.

4244 {
4245 return new FPExpr(this, Native.mkFpaFp(nCtx(), sgn.getNativeObject(), sig.getNativeObject(), exp.getNativeObject()));
4246 }

◆ 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 3909 of file Context.java.

3910 {
3911 return mkFPNumeral(v, s);
3912 }

◆ 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 3932 of file Context.java.

3933 {
3934 return mkFPNumeral(v, s);
3935 }

◆ mkFPAbs()

FPExpr mkFPAbs ( Expr< FPSort t)
inline

Floating-point absolute value

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 3969 of file Context.java.

3970 {
3971 return new FPExpr(this, Native.mkFpaAbs(nCtx(), t.getNativeObject()));
3972 }

◆ 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 3991 of file Context.java.

3992 {
3993 return new FPExpr(this, Native.mkFpaAdd(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
3994 }

◆ 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 4027 of file Context.java.

4028 {
4029 return new FPExpr(this, Native.mkFpaDiv(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4030 }

◆ 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 4155 of file Context.java.

4156 {
4157 return new BoolExpr(this, Native.mkFpaEq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4158 }

◆ 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 4042 of file Context.java.

4043 {
4044 return new FPExpr(this, Native.mkFpaFma(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject(), t3.getNativeObject()));
4045 }

◆ 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 4131 of file Context.java.

4132 {
4133 return new BoolExpr(this, Native.mkFpaGeq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4134 }

◆ 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 4142 of file Context.java.

4143 {
4144 return new BoolExpr(this, Native.mkFpaGt(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4145 }

◆ 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 3828 of file Context.java.

3829 {
3830 return new FPNum(this, Native.mkFpaInf(nCtx(), s.getNativeObject(), negative));
3831 }

◆ 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 4195 of file Context.java.

4196 {
4197 return new BoolExpr(this, Native.mkFpaIsInfinite(nCtx(), t.getNativeObject()));
4198 }

◆ mkFPIsNaN()

BoolExpr mkFPIsNaN ( Expr< FPSort t)
inline

Predicate indicating whether t is a NaN.

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 4205 of file Context.java.

4206 {
4207 return new BoolExpr(this, Native.mkFpaIsNan(nCtx(), t.getNativeObject()));
4208 }

◆ 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 4215 of file Context.java.

4216 {
4217 return new BoolExpr(this, Native.mkFpaIsNegative(nCtx(), t.getNativeObject()));
4218 }

◆ 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 4165 of file Context.java.

4166 {
4167 return new BoolExpr(this, Native.mkFpaIsNormal(nCtx(), t.getNativeObject()));
4168 }

◆ 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 4225 of file Context.java.

4226 {
4227 return new BoolExpr(this, Native.mkFpaIsPositive(nCtx(), t.getNativeObject()));
4228 }

◆ 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 4175 of file Context.java.

4176 {
4177 return new BoolExpr(this, Native.mkFpaIsSubnormal(nCtx(), t.getNativeObject()));
4178 }

◆ 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 4185 of file Context.java.

4186 {
4187 return new BoolExpr(this, Native.mkFpaIsZero(nCtx(), t.getNativeObject()));
4188 }

◆ 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 4109 of file Context.java.

4110 {
4111 return new BoolExpr(this, Native.mkFpaLeq(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4112 }

◆ 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 4120 of file Context.java.

4121 {
4122 return new BoolExpr(this, Native.mkFpaLt(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4123 }

◆ 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 4098 of file Context.java.

4099 {
4100 return new FPExpr(this, Native.mkFpaMax(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4101 }

◆ 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 4087 of file Context.java.

4088 {
4089 return new FPExpr(this, Native.mkFpaMin(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4090 }

◆ 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 4015 of file Context.java.

4016 {
4017 return new FPExpr(this, Native.mkFpaMul(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4018 }

◆ mkFPNaN()

FPNum mkFPNaN ( FPSort  s)
inline

Create a NaN of sort s.

Parameters
sFloatingPoint sort.
Exceptions
Z3Exception

Definition at line 3817 of file Context.java.

3818 {
3819 return new FPNum(this, Native.mkFpaNan(nCtx(), s.getNativeObject()));
3820 }

◆ mkFPNeg()

FPExpr mkFPNeg ( Expr< FPSort t)
inline

Floating-point negation

Parameters
tfloating-point term
Exceptions
Z3Exception

Definition at line 3979 of file Context.java.

3980 {
3981 return new FPExpr(this, Native.mkFpaNeg(nCtx(), t.getNativeObject()));
3982 }

◆ 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 3885 of file Context.java.

3886 {
3887 return new FPNum(this, Native.mkFpaNumeralIntUint(nCtx(), sgn, exp, sig, s.getNativeObject()));
3888 }

◆ 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 3898 of file Context.java.

3899 {
3900 return new FPNum(this, Native.mkFpaNumeralInt64Uint64(nCtx(), sgn, exp, sig, s.getNativeObject()));
3901 }

◆ 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 3861 of file Context.java.

3862 {
3863 return new FPNum(this, Native.mkFpaNumeralDouble(nCtx(), v, s.getNativeObject()));
3864 }

◆ 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 3850 of file Context.java.

3851 {
3852 return new FPNum(this, Native.mkFpaNumeralFloat(nCtx(), v, s.getNativeObject()));
3853 }

◆ 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 3872 of file Context.java.

3873 {
3874 return new FPNum(this, Native.mkFpaNumeralInt(nCtx(), v, s.getNativeObject()));
3875 }

◆ 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 4064 of file Context.java.

4065 {
4066 return new FPExpr(this, Native.mkFpaRem(nCtx(), t1.getNativeObject(), t2.getNativeObject()));
4067 }

◆ mkFPRNA()

FPRMNum mkFPRNA ( )
inline

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

Exceptions
Z3Exception

Definition at line 3669 of file Context.java.

3670 {
3671 return new FPRMNum(this, Native.mkFpaRna(nCtx()));
3672 }

◆ mkFPRNE()

FPRMNum mkFPRNE ( )
inline

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

Exceptions
Z3Exception

Definition at line 3651 of file Context.java.

3652 {
3653 return new FPRMNum(this, Native.mkFpaRne(nCtx()));
3654 }

◆ mkFPRoundingModeSort()

FPRMSort mkFPRoundingModeSort ( )
inline

Create the floating-point RoundingMode sort.

Exceptions
Z3Exception

Definition at line 3633 of file Context.java.

3634 {
3635 return new FPRMSort(this);
3636 }

◆ mkFPRoundNearestTiesToAway()

FPRMNum mkFPRoundNearestTiesToAway ( )
inline

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

Exceptions
Z3Exception

Definition at line 3660 of file Context.java.

3661 {
3662 return new FPRMNum(this, Native.mkFpaRoundNearestTiesToAway(nCtx()));
3663 }

◆ mkFPRoundNearestTiesToEven()

FPRMExpr mkFPRoundNearestTiesToEven ( )
inline

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

Exceptions
Z3Exception

Definition at line 3642 of file Context.java.

3643 {
3644 return new FPRMExpr(this, Native.mkFpaRoundNearestTiesToEven(nCtx()));
3645 }

◆ 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 4076 of file Context.java.

4077 {
4078 return new FPExpr(this, Native.mkFpaRoundToIntegral(nCtx(), rm.getNativeObject(), t.getNativeObject()));
4079 }

◆ mkFPRoundTowardNegative()

FPRMNum mkFPRoundTowardNegative ( )
inline

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

Exceptions
Z3Exception

Definition at line 3696 of file Context.java.

3697 {
3698 return new FPRMNum(this, Native.mkFpaRoundTowardNegative(nCtx()));
3699 }

◆ mkFPRoundTowardPositive()

FPRMNum mkFPRoundTowardPositive ( )
inline

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

Exceptions
Z3Exception

Definition at line 3678 of file Context.java.

3679 {
3680 return new FPRMNum(this, Native.mkFpaRoundTowardPositive(nCtx()));
3681 }

◆ mkFPRoundTowardZero()

FPRMNum mkFPRoundTowardZero ( )
inline

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

Exceptions
Z3Exception

Definition at line 3714 of file Context.java.

3715 {
3716 return new FPRMNum(this, Native.mkFpaRoundTowardZero(nCtx()));
3717 }

◆ mkFPRTN()

FPRMNum mkFPRTN ( )
inline

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

Exceptions
Z3Exception

Definition at line 3705 of file Context.java.

3706 {
3707 return new FPRMNum(this, Native.mkFpaRtn(nCtx()));
3708 }

◆ mkFPRTP()

FPRMNum mkFPRTP ( )
inline

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

Exceptions
Z3Exception

Definition at line 3687 of file Context.java.

3688 {
3689 return new FPRMNum(this, Native.mkFpaRtp(nCtx()));
3690 }

◆ mkFPRTZ()

FPRMNum mkFPRTZ ( )
inline

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

Exceptions
Z3Exception

Definition at line 3723 of file Context.java.

3724 {
3725 return new FPRMNum(this, Native.mkFpaRtz(nCtx()));
3726 }

◆ 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 3734 of file Context.java.

3735 {
3736 return new FPSort(this, ebits, sbits);
3737 }
FPSort(ebits, sbits, ctx=None)
Definition z3py.py:10314

◆ mkFPSort128()

FPSort mkFPSort128 ( )
inline

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

Exceptions
Z3Exception

Definition at line 3806 of file Context.java.

3807 {
3808 return new FPSort(this, Native.mkFpaSort128(nCtx()));
3809 }

◆ mkFPSort16()

FPSort mkFPSort16 ( )
inline

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

Exceptions
Z3Exception

Definition at line 3752 of file Context.java.

3753 {
3754 return new FPSort(this, Native.mkFpaSort16(nCtx()));
3755 }

◆ mkFPSort32()

FPSort mkFPSort32 ( )
inline

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

Exceptions
Z3Exception

Definition at line 3770 of file Context.java.

3771 {
3772 return new FPSort(this, Native.mkFpaSort32(nCtx()));
3773 }

◆ mkFPSort64()

FPSort mkFPSort64 ( )
inline

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

Exceptions
Z3Exception

Definition at line 3788 of file Context.java.

3789 {
3790 return new FPSort(this, Native.mkFpaSort64(nCtx()));
3791 }

◆ mkFPSortDouble()

FPSort mkFPSortDouble ( )
inline

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

Exceptions
Z3Exception

Definition at line 3779 of file Context.java.

3780 {
3781 return new FPSort(this, Native.mkFpaSortDouble(nCtx()));
3782 }

◆ mkFPSortHalf()

FPSort mkFPSortHalf ( )
inline

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

Exceptions
Z3Exception

Definition at line 3743 of file Context.java.

3744 {
3745 return new FPSort(this, Native.mkFpaSortHalf(nCtx()));
3746 }

◆ mkFPSortQuadruple()

FPSort mkFPSortQuadruple ( )
inline

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

Exceptions
Z3Exception

Definition at line 3797 of file Context.java.

3798 {
3799 return new FPSort(this, Native.mkFpaSortQuadruple(nCtx()));
3800 }

◆ mkFPSortSingle()

FPSort mkFPSortSingle ( )
inline

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

Exceptions
Z3Exception

Definition at line 3761 of file Context.java.

3762 {
3763 return new FPSort(this, Native.mkFpaSortSingle(nCtx()));
3764 }

◆ 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 4053 of file Context.java.

4054 {
4055 return new FPExpr(this, Native.mkFpaSqrt(nCtx(), rm.getNativeObject(), t.getNativeObject()));
4056 }

◆ 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 4003 of file Context.java.

4004 {
4005 return new FPExpr(this, Native.mkFpaSub(nCtx(), rm.getNativeObject(), t1.getNativeObject(), t2.getNativeObject()));
4006 }

◆ mkFPToBV()

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

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

Parameters
rmRoundingMode term.
tFloatingPoint term
szSize of the resulting bit-vector.
signedIndicates whether the result is a signed or unsigned bit-vector. Remarks: Produces a term that represents the conversion of the floating-point term t into a bit-vector term of size sz in 2's complement format (signed when signed==true). If necessary, the result will be rounded according to rounding mode rm.
Exceptions
Z3Exception

Definition at line 4344 of file Context.java.

4345 {
4346 if (signed)
4347 return new BitVecExpr(this, Native.mkFpaToSbv(nCtx(), rm.getNativeObject(), t.getNativeObject(), sz));
4348 else
4349 return new BitVecExpr(this, Native.mkFpaToUbv(nCtx(), rm.getNativeObject(), t.getNativeObject(), sz));
4350 }

◆ 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 4259 of file Context.java.

4260 {
4261 return new FPExpr(this, Native.mkFpaToFpBv(nCtx(), bv.getNativeObject(), s.getNativeObject()));
4262 }

◆ mkFPToFP() [2/6]

FPExpr mkFPToFP ( Expr< FPRMSort rm,
Expr< BitVecSort t,
FPSort  s,
boolean signed   
)
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.
signedflag indicating whether t is interpreted as signed or unsigned bit-vector. Remarks: Produces a term that represents the conversion of the bit-vector term t into a floating-point term of sort s. The bit-vector t is taken to be in signed 2's complement format (when signed==true, otherwise unsigned). If necessary, the result will be rounded according to rounding mode rm.
Exceptions
Z3Exception

Definition at line 4309 of file Context.java.

4310 {
4311 if (signed)
4312 return new FPExpr(this, Native.mkFpaToFpSigned(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4313 else
4314 return new FPExpr(this, Native.mkFpaToFpUnsigned(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4315 }

◆ 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 4394 of file Context.java.

4395 {
4396 return new BitVecExpr(this, Native.mkFpaToFpIntReal(nCtx(), rm.getNativeObject(), exp.getNativeObject(), sig.getNativeObject(), s.getNativeObject()));
4397 }

◆ 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 4275 of file Context.java.

4276 {
4277 return new FPExpr(this, Native.mkFpaToFpFloat(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4278 }

◆ 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 4291 of file Context.java.

4292 {
4293 return new FPExpr(this, Native.mkFpaToFpReal(nCtx(), rm.getNativeObject(), t.getNativeObject(), s.getNativeObject()));
4294 }

◆ 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 4327 of file Context.java.

4328 {
4329 return new FPExpr(this, Native.mkFpaToFpFloat(nCtx(), s.getNativeObject(), rm.getNativeObject(), t.getNativeObject()));
4330 }

◆ 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 4376 of file Context.java.

4377 {
4378 return new BitVecExpr(this, Native.mkFpaToIeeeBv(nCtx(), t.getNativeObject()));
4379 }

◆ 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 4361 of file Context.java.

4362 {
4363 return new RealExpr(this, Native.mkFpaToReal(nCtx(), t.getNativeObject()));
4364 }

◆ 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 3839 of file Context.java.

3840 {
3841 return new FPNum(this, Native.mkFpaZero(nCtx(), s.getNativeObject(), negative));
3842 }

◆ mkFreshConst()

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

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

Definition at line 762 of file Context.java.

763 {
764 checkContextMatch(range);
765 return (Expr<R>) Expr.create(this,
766 Native.mkFreshConst(nCtx(), prefix, range.getNativeObject()));
767 }

◆ mkFreshConstDecl()

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

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

See also
#mkFuncDecl(String,Sort,Sort)
#mkFuncDecl(String,Sort[],Sort)

Definition at line 702 of file Context.java.

704 {
705 checkContextMatch(range);
706 return new FuncDecl<>(this, prefix, null, range);
707 }

◆ mkFreshFuncDecl()

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

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

See also
#mkFuncDecl(String,Sort,Sort)
#mkFuncDecl(String,Sort[],Sort)

Definition at line 669 of file Context.java.

671 {
672 checkContextMatch(domain);
673 checkContextMatch(range);
674 return new FuncDecl<>(this, prefix, domain, range);
675 }

◆ mkFullRe()

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

Create the full regular expression. Corresponds to re.all

Definition at line 2529 of file Context.java.

2530 {
2531 return (ReExpr<R>) Expr.create(this, Native.mkReFull(nCtx(), s.getNativeObject()));
2532 }

◆ mkFullSet()

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

Create the full set.

Definition at line 2035 of file Context.java.

2036 {
2037 checkContextMatch(domain);
2038 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2039 Native.mkFullSet(nCtx(), domain.getNativeObject()));
2040 }

◆ mkFuncDecl() [1/4]

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

Creates a new function declaration.

Definition at line 627 of file Context.java.

629 {
630 checkContextMatch(domain);
631 checkContextMatch(range);
632 Sort[] q = new Sort[] { domain };
633 return new FuncDecl<>(this, mkSymbol(name), q, range);
634 }

◆ mkFuncDecl() [2/4]

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

Creates a new function declaration.

Definition at line 616 of file Context.java.

618 {
619 checkContextMatch(domain);
620 checkContextMatch(range);
621 return new FuncDecl<>(this, mkSymbol(name), domain, range);
622 }

◆ mkFuncDecl() [3/4]

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

Creates a new function declaration.

Definition at line 603 of file Context.java.

605 {
606 checkContextMatch(name);
607 checkContextMatch(domain);
608 checkContextMatch(range);
609 Sort[] q = new Sort[] { domain };
610 return new FuncDecl<>(this, name, q, range);
611 }

◆ mkFuncDecl() [4/4]

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

Creates a new function declaration.

Definition at line 577 of file Context.java.

578 {
579 checkContextMatch(name);
580 checkContextMatch(domain);
581 checkContextMatch(range);
582 return new FuncDecl<>(this, name, domain, range);
583 }

◆ mkGe()

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

Create an expression representing t1 &gt;= t2

Definition at line 1109 of file Context.java.

1110 {
1111 checkContextMatch(t1);
1112 checkContextMatch(t2);
1113 return new BoolExpr(this, Native.mkGe(nCtx(), t1.getNativeObject(),
1114 t2.getNativeObject()));
1115 }

◆ 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 3058 of file Context.java.

3059 {
3060 return new Goal(this, models, unsatCores, proofs);
3061 }

◆ mkGt()

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

Create an expression representing t1 &gt; t2

Definition at line 1098 of file Context.java.

1099 {
1100 checkContextMatch(t1);
1101 checkContextMatch(t2);
1102 return new BoolExpr(this, Native.mkGt(nCtx(), t1.getNativeObject(),
1103 t2.getNativeObject()));
1104 }

◆ mkIff()

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

Create an expression representing t1 iff t2.

Definition at line 927 of file Context.java.

928 {
929 checkContextMatch(t1);
930 checkContextMatch(t2);
931 return new BoolExpr(this, Native.mkIff(nCtx(), t1.getNativeObject(),
932 t2.getNativeObject()));
933 }

◆ mkImplies()

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

Create an expression representing t1 -> t2.

Definition at line 938 of file Context.java.

939 {
940 checkContextMatch(t1);
941 checkContextMatch(t2);
942 return new BoolExpr(this, Native.mkImplies(nCtx(),
943 t1.getNativeObject(), t2.getNativeObject()));
944 }

◆ 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 2305 of file Context.java.

2306 {
2307 checkContextMatch(s, substr, offset);
2308 return (IntExpr)Expr.create(this, Native.mkSeqIndex(nCtx(), s.getNativeObject(), substr.getNativeObject(), offset.getNativeObject()));
2309 }

◆ mkInRe()

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

Check for regular expression membership.

Definition at line 2409 of file Context.java.

2410 {
2411 checkContextMatch(s, re);
2412 return (BoolExpr) Expr.create(this, Native.mkSeqInRe(nCtx(), s.getNativeObject(), re.getNativeObject()));
2413 }

◆ 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 2768 of file Context.java.

2769 {
2770
2771 return new IntNum(this, Native.mkInt(nCtx(), v, getIntSort()
2772 .getNativeObject()));
2773 }

◆ 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 2781 of file Context.java.

2782 {
2783
2784 return new IntNum(this, Native.mkInt64(nCtx(), v, getIntSort()
2785 .getNativeObject()));
2786 }

◆ 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 2755 of file Context.java.

2756 {
2757
2758 return new IntNum(this, Native.mkNumeral(nCtx(), v, getIntSort()
2759 .getNativeObject()));
2760 }

◆ 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 1700 of file Context.java.

1701 {
1702 checkContextMatch(t);
1703 return new BitVecExpr(this, Native.mkInt2bv(nCtx(), n,
1704 t.getNativeObject()));
1705 }

◆ 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 1127 of file Context.java.

1128 {
1129 checkContextMatch(t);
1130 return new RealExpr(this,
1131 Native.mkInt2real(nCtx(), t.getNativeObject()));
1132 }

◆ mkIntConst() [1/2]

IntExpr mkIntConst ( String  name)
inline

Creates an integer constant.

Definition at line 805 of file Context.java.

806 {
807 return (IntExpr) mkConst(name, getIntSort());
808 }

◆ mkIntConst() [2/2]

IntExpr mkIntConst ( Symbol  name)
inline

Creates an integer constant.

Definition at line 797 of file Context.java.

798 {
799 return (IntExpr) mkConst(name, getIntSort());
800 }

◆ mkIntersect()

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

Create the intersection of regular languages.

Definition at line 2500 of file Context.java.

2501 {
2502 checkContextMatch(t);
2503 return (ReExpr<R>) Expr.create(this, Native.mkReIntersect(nCtx(), t.length, AST.arrayToNative(t)));
2504 }

◆ mkIntSort()

IntSort mkIntSort ( )
inline

Create a new integer sort.

Definition at line 206 of file Context.java.

207 {
208 return new IntSort(this);
209 }

◆ mkIsDigit()

BoolExpr mkIsDigit ( Expr< CharSort ch)
inline

Create a check if the character is a digit.

Definition at line 2592 of file Context.java.

2593 {
2594 checkContextMatch(ch);
2595 return (BoolExpr) Expr.create(this, Native.mkCharIsDigit(nCtx(), ch.getNativeObject()));
2596 }

◆ mkIsInteger()

BoolExpr mkIsInteger ( Expr< RealSort t)
inline

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

Definition at line 1149 of file Context.java.

1150 {
1151 checkContextMatch(t);
1152 return new BoolExpr(this, Native.mkIsInt(nCtx(), t.getNativeObject()));
1153 }

◆ 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 915 of file Context.java.

916 {
917 checkContextMatch(t1);
918 checkContextMatch(t2);
919 checkContextMatch(t3);
920 return (Expr<R>) Expr.create(this, Native.mkIte(nCtx(), t1.getNativeObject(),
921 t2.getNativeObject(), t3.getNativeObject()));
922 }

◆ 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 2953 of file Context.java.

2954 {
2955 return Lambda.of(this, boundConstants, body);
2956 }
Lambda(vs, body)
Definition z3py.py:2404

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

Definition at line 2942 of file Context.java.

2943 {
2944 return Lambda.of(this, sorts, names, body);
2945 }

◆ 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 2314 of file Context.java.

2315 {
2316 checkContextMatch(s, substr);
2317 return (IntExpr)Expr.create(this, Native.mkSeqLastIndex(nCtx(), s.getNativeObject(), substr.getNativeObject()));
2318 }

◆ mkLe()

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

Create an expression representing t1 &lt;= t2

Definition at line 1087 of file Context.java.

1088 {
1089 checkContextMatch(t1);
1090 checkContextMatch(t2);
1091 return new BoolExpr(this, Native.mkLe(nCtx(), t1.getNativeObject(),
1092 t2.getNativeObject()));
1093 }

◆ mkLength()

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

Retrieve the length of a given sequence.

Definition at line 2221 of file Context.java.

2222 {
2223 checkContextMatch(s);
2224 return (IntExpr) Expr.create(this, Native.mkSeqLength(nCtx(), s.getNativeObject()));
2225 }

◆ mkLinearOrder()

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

Creates or a linear order.

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

Definition at line 4404 of file Context.java.

4404 {
4405 return (FuncDecl<BoolSort>) FuncDecl.create(
4406 this,
4407 Native.mkLinearOrder(
4408 nCtx(),
4409 sort.getNativeObject(),
4410 index
4411 )
4412 );
4413 }

◆ mkListSort() [1/2]

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

Create a new list sort.

Definition at line 319 of file Context.java.

320 {
321 checkContextMatch(elemSort);
322 return new ListSort<>(this, mkSymbol(name), elemSort);
323 }

◆ mkListSort() [2/2]

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

Create a new list sort.

Definition at line 309 of file Context.java.

310 {
311 checkContextMatch(name);
312 checkContextMatch(elemSort);
313 return new ListSort<>(this, name, elemSort);
314 }

◆ 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 2443 of file Context.java.

2444 {
2445 return (ReExpr<R>) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, 0));
2446 }

◆ 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 2435 of file Context.java.

2436 {
2437 return (ReExpr<R>) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, hi));
2438 }

◆ mkLt()

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

Create an expression representing t1 &lt; t2

Definition at line 1076 of file Context.java.

1077 {
1078 checkContextMatch(t1);
1079 checkContextMatch(t2);
1080 return new BoolExpr(this, Native.mkLt(nCtx(), t1.getNativeObject(),
1081 t2.getNativeObject()));
1082 }

◆ 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
#mkArraySort(Sort[], R)
#mkSelect(Expr<ArraySort<D, R>> a, Expr<D> i)
#mkStore(Expr<ArraySort<D, R>> a, Expr<D> i, Expr<R> v)

Definition at line 1980 of file Context.java.

1981 {
1982 checkContextMatch(f);
1983 checkContextMatch(args);
1984 return (ArrayExpr<D, R2>) Expr.create(this, Native.mkMap(nCtx(),
1985 f.getNativeObject(), AST.arrayLength(args),
1986 AST.arrayToNative(args)));
1987 }

◆ 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 1038 of file Context.java.

1039 {
1040 checkContextMatch(t1);
1041 checkContextMatch(t2);
1042 return new IntExpr(this, Native.mkMod(nCtx(), t1.getNativeObject(),
1043 t2.getNativeObject()));
1044 }

◆ mkMul()

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

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

Definition at line 994 of file Context.java.

995 {
996 checkContextMatch(t);
997 return (ArithExpr<R>) Expr.create(this,
998 Native.mkMul(nCtx(), t.length, AST.arrayToNative(t)));
999 }

◆ mkNot()

final BoolExpr mkNot ( Expr< BoolSort a)
inline

Create an expression representing not(a).

Definition at line 902 of file Context.java.

903 {
904 checkContextMatch(a);
905 return new BoolExpr(this, Native.mkNot(nCtx(), a.getNativeObject()));
906 }

◆ mkNth()

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

Retrieve element at index.

Definition at line 2286 of file Context.java.

2287 {
2288 checkContextMatch(s, index);
2289 return (Expr<R>) Expr.create(this, Native.mkSeqNth(nCtx(), s.getNativeObject(), index.getNativeObject()));
2290 }

◆ mkNumeral() [1/3]

final< R extends Sort > Expr< R > mkNumeral ( int  v,
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 2671 of file Context.java.

2672 {
2673 checkContextMatch(ty);
2674 return (Expr<R>) Expr.create(this, Native.mkInt(nCtx(), v, ty.getNativeObject()));
2675 }

◆ mkNumeral() [2/3]

final< R extends Sort > Expr< R > mkNumeral ( long  v,
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 2687 of file Context.java.

2688 {
2689 checkContextMatch(ty);
2690 return (Expr<R>) Expr.create(this,
2691 Native.mkInt64(nCtx(), v, ty.getNativeObject()));
2692 }

◆ mkNumeral() [3/3]

final< R extends Sort > Expr< R > mkNumeral ( String  v,
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 2654 of file Context.java.

2655 {
2656 checkContextMatch(ty);
2657 return (Expr<R>) Expr.create(this,
2658 Native.mkNumeral(nCtx(), v, ty.getNativeObject()));
2659 }

◆ mkOptimize()

Optimize mkOptimize ( )
inline

Create a Optimize context.

Definition at line 3623 of file Context.java.

3624 {
3625 return new Optimize(this);
3626 }

◆ mkOption()

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

Create the optional regular expression.

Definition at line 2461 of file Context.java.

2462 {
2463 checkContextMatch(re);
2464 return (ReExpr<R>) Expr.create(this, Native.mkReOption(nCtx(), re.getNativeObject()));
2465 }

◆ mkOr()

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

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

Definition at line 972 of file Context.java.

973 {
974 checkContextMatch(t);
975 return new BoolExpr(this, Native.mkOr(nCtx(), t.length,
976 AST.arrayToNative(t)));
977 }

◆ mkParams()

Params mkParams ( )
inline

Creates a new ParameterSet.

Definition at line 3066 of file Context.java.

3067 {
3068 return new Params(this);
3069 }

◆ mkPartialOrder()

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

Creates a partial order.

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

Definition at line 4420 of file Context.java.

4420 {
4421 return (FuncDecl<BoolSort>) FuncDecl.create(
4422 this,
4423 Native.mkPartialOrder(
4424 nCtx(),
4425 sort.getNativeObject(),
4426 index
4427 )
4428 );
4429 }

◆ mkPattern()

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

Create a quantifier pattern.

Definition at line 724 of file Context.java.

725 {
726 if (terms.length == 0)
727 throw new Z3Exception("Cannot create a pattern from zero terms");
728
729 long[] termsNative = AST.arrayToNative(terms);
730 return new Pattern(this, Native.mkPattern(nCtx(), terms.length,
731 termsNative));
732 }

◆ mkPBEq()

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

Create a pseudo-Boolean equal constraint.

Definition at line 2637 of file Context.java.

2638 {
2639 checkContextMatch(args);
2640 return (BoolExpr) Expr.create(this, Native.mkPbeq(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2641 }

◆ mkPBGe()

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

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

Definition at line 2628 of file Context.java.

2629 {
2630 checkContextMatch(args);
2631 return (BoolExpr) Expr.create(this, Native.mkPbge(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2632 }

◆ mkPBLe()

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

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

Definition at line 2619 of file Context.java.

2620 {
2621 checkContextMatch(args);
2622 return (BoolExpr) Expr.create(this, Native.mkPble(nCtx(), args.length, AST.arrayToNative(args), coeffs, k));
2623 }

◆ mkPlus()

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

Take the Kleene plus of a regular expression.

Definition at line 2452 of file Context.java.

2453 {
2454 checkContextMatch(re);
2455 return (ReExpr<R>) Expr.create(this, Native.mkRePlus(nCtx(), re.getNativeObject()));
2456 }

◆ mkPower() [1/2]

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

Create power regular expression.

Definition at line 2427 of file Context.java.

2428 {
2429 return (ReExpr<R>) Expr.create(this, Native.mkRePower(nCtx(), re.getNativeObject(), n));
2430 }

◆ 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 1062 of file Context.java.

1064 {
1065 checkContextMatch(t1);
1066 checkContextMatch(t2);
1067 return (ArithExpr<R>) Expr.create(
1068 this,
1069 Native.mkPower(nCtx(), t1.getNativeObject(),
1070 t2.getNativeObject()));
1071 }

◆ mkPrefixOf()

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

Check for sequence prefix.

Definition at line 2230 of file Context.java.

2231 {
2232 checkContextMatch(s1, s2);
2233 return (BoolExpr) Expr.create(this, Native.mkSeqPrefix(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2234 }

◆ mkProbe()

Probe mkProbe ( String  name)
inline

Creates a new Probe.

Definition at line 3439 of file Context.java.

3440 {
3441 return new Probe(this, name);
3442 }

◆ mkPropagateFunction()

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

Definition at line 585 of file Context.java.

586 {
587 checkContextMatch(name);
588 checkContextMatch(domain);
589 checkContextMatch(range);
590 long f = Native.solverPropagateDeclare(
591 this.nCtx(),
592 name.getNativeObject(),
593 AST.arrayLength(domain),
594 AST.arrayToNative(domain),
595 range.getNativeObject());
596 return new FuncDecl<>(this, f);
597 }

◆ 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
#mkForall(Sort[],Symbol[],Expr<BoolSort>,int,Pattern[],Expr<?>[],Symbol,Symbol)

Definition at line 2912 of file Context.java.

2915 {
2916
2917 if (universal)
2918 return mkForall(boundConstants, body, weight, patterns, noPatterns,
2919 quantifierID, skolemID);
2920 else
2921 return mkExists(boundConstants, body, weight, patterns, noPatterns,
2922 quantifierID, skolemID);
2923 }
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
#mkForall(Sort[],Symbol[],Expr<BoolSort>,int,Pattern[],Expr<?>[],Symbol,Symbol)

Definition at line 2894 of file Context.java.

2898 {
2899
2900 if (universal)
2901 return mkForall(sorts, names, body, weight, patterns, noPatterns,
2902 quantifierID, skolemID);
2903 else
2904 return mkExists(sorts, names, body, weight, patterns, noPatterns,
2905 quantifierID, skolemID);
2906 }

◆ mkRange()

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

Create a range expression.

Definition at line 2547 of file Context.java.

2548 {
2549 checkContextMatch(lo, hi);
2550 return (ReExpr<SeqSort<CharSort>>) Expr.create(this, Native.mkReRange(nCtx(), lo.getNativeObject(), hi.getNativeObject()));
2551 }

◆ 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
#mkNumeral(String v, R ty)

Definition at line 2703 of file Context.java.

2704 {
2705 if (den == 0) {
2706 throw new Z3Exception("Denominator is zero");
2707 }
2708
2709 return new RatNum(this, Native.mkReal(nCtx(), num, den));
2710 }

◆ 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 2731 of file Context.java.

2732 {
2733
2734 return new RatNum(this, Native.mkInt(nCtx(), v, getRealSort()
2735 .getNativeObject()));
2736 }

◆ 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 2744 of file Context.java.

2745 {
2746
2747 return new RatNum(this, Native.mkInt64(nCtx(), v, getRealSort()
2748 .getNativeObject()));
2749 }

◆ 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 2718 of file Context.java.

2719 {
2720
2721 return new RatNum(this, Native.mkNumeral(nCtx(), v, getRealSort()
2722 .getNativeObject()));
2723 }

◆ 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 1140 of file Context.java.

1141 {
1142 checkContextMatch(t);
1143 return new IntExpr(this, Native.mkReal2int(nCtx(), t.getNativeObject()));
1144 }

◆ mkRealConst() [1/2]

RealExpr mkRealConst ( String  name)
inline

Creates a real constant.

Definition at line 821 of file Context.java.

822 {
823 return (RealExpr) mkConst(name, getRealSort());
824 }

◆ mkRealConst() [2/2]

RealExpr mkRealConst ( Symbol  name)
inline

Creates a real constant.

Definition at line 813 of file Context.java.

814 {
815 return (RealExpr) mkConst(name, getRealSort());
816 }

◆ mkRealSort()

RealSort mkRealSort ( )
inline

Create a real sort.

Definition at line 214 of file Context.java.

215 {
216 return new RealSort(this);
217 }

◆ mkRecFuncDecl()

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

Creates a new recursive function declaration.

Definition at line 639 of file Context.java.

640 {
641 checkContextMatch(name);
642 checkContextMatch(domain);
643 checkContextMatch(range);
644 return new FuncDecl<>(this, name, domain, range, true);
645 }

◆ 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 1051 of file Context.java.

1052 {
1053 checkContextMatch(t1);
1054 checkContextMatch(t2);
1055 return new IntExpr(this, Native.mkRem(nCtx(), t1.getNativeObject(),
1056 t2.getNativeObject()));
1057 }

◆ 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 1572 of file Context.java.

1573 {
1574 checkContextMatch(t);
1575 return new BitVecExpr(this, Native.mkRepeat(nCtx(), i,
1576 t.getNativeObject()));
1577 }

◆ 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 2363 of file Context.java.

2364 {
2365 checkContextMatch(s, src, dst);
2366 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplace(nCtx(), s.getNativeObject(), src.getNativeObject(), dst.getNativeObject()));
2367 }

◆ 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 2372 of file Context.java.

2373 {
2374 checkContextMatch(s, src, dst);
2375 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceAll(nCtx(), s.getNativeObject(), src.getNativeObject(), dst.getNativeObject()));
2376 }

◆ 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 2381 of file Context.java.

2382 {
2383 checkContextMatch(s, re, dst);
2384 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceRe(nCtx(), s.getNativeObject(), re.getNativeObject(), dst.getNativeObject()));
2385 }

◆ 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 2390 of file Context.java.

2391 {
2392 checkContextMatch(s, re, dst);
2393 return (SeqExpr<R>) Expr.create(this, Native.mkSeqReplaceReAll(nCtx(), s.getNativeObject(), re.getNativeObject(), dst.getNativeObject()));
2394 }

◆ mkReSort()

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

Create a new regular expression sort

Definition at line 267 of file Context.java.

268 {
269 return new ReSort<>(this, Native.mkReSort(nCtx(), s.getNativeObject()));
270 }

◆ 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
#mkArraySort(Sort[], R)
#mkStore(Expr<ArraySort<D, R>> a, Expr<D> i, Expr<R> v)

Definition at line 1868 of file Context.java.

1869 {
1870 checkContextMatch(a);
1871 checkContextMatch(i);
1872 return (Expr<R>) Expr.create(
1873 this,
1874 Native.mkSelect(nCtx(), a.getNativeObject(),
1875 i.getNativeObject()));
1876 }

◆ 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
#mkArraySort(Sort[], R)
#mkStore(Expr<ArraySort<D, R>> a, Expr<D> i, Expr<R> v)

Definition at line 1890 of file Context.java.

1891 {
1892 checkContextMatch(a);
1893 checkContextMatch(args);
1894 return (Expr<R>) Expr.create(
1895 this,
1896 Native.mkSelectN(nCtx(), a.getNativeObject(), args.length, AST.arrayToNative(args)));
1897 }

◆ 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 2344 of file Context.java.

2345 {
2346 checkContextMatch(f, a, s);
2347 return (Expr<A>) Expr.create(this, Native.mkSeqFoldl(nCtx(), f.getNativeObject(), a.getNativeObject(), s.getNativeObject()));
2348 }

◆ 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 2354 of file Context.java.

2355 {
2356 checkContextMatch(f, i, a, s);
2357 return (Expr<A>) Expr.create(this, Native.mkSeqFoldli(nCtx(), f.getNativeObject(), i.getNativeObject(), a.getNativeObject(), s.getNativeObject()));
2358 }

◆ 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 2324 of file Context.java.

2325 {
2326 checkContextMatch(f, s);
2327 return (SeqExpr<R>) Expr.create(this, Native.mkSeqMap(nCtx(), f.getNativeObject(), s.getNativeObject()));
2328 }

◆ 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 2334 of file Context.java.

2335 {
2336 checkContextMatch(f, i, s);
2337 return (SeqExpr<R>) Expr.create(this, Native.mkSeqMapi(nCtx(), f.getNativeObject(), i.getNativeObject(), s.getNativeObject()));
2338 }

◆ mkSeqSort()

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

Create a new sequence sort

Definition at line 259 of file Context.java.

260 {
261 return new SeqSort<>(this, Native.mkSeqSort(nCtx(), s.getNativeObject()));
262 }

◆ 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 2045 of file Context.java.

2046 {
2047 checkContextMatch(set);
2048 checkContextMatch(element);
2049 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2050 Native.mkSetAdd(nCtx(), set.getNativeObject(),
2051 element.getNativeObject()));
2052 }

◆ mkSetComplement()

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

Take the complement of a set.

Definition at line 2105 of file Context.java.

2106 {
2107 checkContextMatch(arg);
2108 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2109 Native.mkSetComplement(nCtx(), arg.getNativeObject()));
2110 }

◆ 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 2057 of file Context.java.

2058 {
2059 checkContextMatch(set);
2060 checkContextMatch(element);
2061 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2062 Native.mkSetDel(nCtx(), set.getNativeObject(),
2063 element.getNativeObject()));
2064 }

◆ 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 2093 of file Context.java.

2094 {
2095 checkContextMatch(arg1);
2096 checkContextMatch(arg2);
2097 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2098 Native.mkSetDifference(nCtx(), arg1.getNativeObject(),
2099 arg2.getNativeObject()));
2100 }

◆ 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 2082 of file Context.java.

2083 {
2084 checkContextMatch(args);
2085 return (ArrayExpr<D, BoolSort>) Expr.create(this,
2086 Native.mkSetIntersect(nCtx(), args.length,
2087 AST.arrayToNative(args)));
2088 }

◆ mkSetMembership()

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

Check for set membership.

Definition at line 2115 of file Context.java.

2116 {
2117 checkContextMatch(elem);
2118 checkContextMatch(set);
2119 return (BoolExpr) Expr.create(this,
2120 Native.mkSetMember(nCtx(), elem.getNativeObject(),
2121 set.getNativeObject()));
2122 }

◆ mkSetSort()

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

Create a set type.

Definition at line 2016 of file Context.java.

2017 {
2018 checkContextMatch(ty);
2019 return new SetSort<>(this, ty);
2020 }

◆ 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 2127 of file Context.java.

2128 {
2129 checkContextMatch(arg1);
2130 checkContextMatch(arg2);
2131 return (BoolExpr) Expr.create(this,
2132 Native.mkSetSubset(nCtx(), arg1.getNativeObject(),
2133 arg2.getNativeObject()));
2134 }

◆ 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 2070 of file Context.java.

2071 {
2072 checkContextMatch(args);
2073 return (ArrayExpr<D, BoolSort>)Expr.create(this,
2074 Native.mkSetUnion(nCtx(), args.length,
2075 AST.arrayToNative(args)));
2076 }

◆ 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 1546 of file Context.java.

1547 {
1548 checkContextMatch(t);
1549 return new BitVecExpr(this, Native.mkSignExt(nCtx(), i,
1550 t.getNativeObject()));
1551 }

◆ mkSimpleSolver()

Solver mkSimpleSolver ( )
inline

Creates a new (incremental) solver.

Definition at line 3586 of file Context.java.

3587 {
3588 return new Solver(this, Native.mkSimpleSolver(nCtx()));
3589 }

◆ mkSimplifier()

Simplifier mkSimplifier ( String  name)
inline

Creates a new Simplifier.

Definition at line 3339 of file Context.java.

3340 {
3341 return new Simplifier(this, name);
3342 }

◆ 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 3552 of file Context.java.

3553 {
3554 return mkSolver((Symbol) null);
3555 }

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 3607 of file Context.java.

3608 {
3609 return new Solver(this, Native.solverAddSimplifier(nCtx(), s.getNativeObject(), simp.getNativeObject()));
3610 }

◆ mkSolver() [3/5]

Solver mkSolver ( String  logic)
inline

Creates a new (incremental) solver.

See also
#mkSolver(Symbol)

Definition at line 3578 of file Context.java.

3579 {
3580 return mkSolver(mkSymbol(logic));
3581 }

◆ 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 3564 of file Context.java.

3565 {
3566
3567 if (logic == null)
3568 return new Solver(this, Native.mkSolver(nCtx()));
3569 else
3570 return new Solver(this, Native.mkSolverForLogic(nCtx(),
3571 logic.getNativeObject()));
3572 }

◆ 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 3597 of file Context.java.

3598 {
3599
3600 return new Solver(this, Native.mkSolverFromTactic(nCtx(),
3601 t.getNativeObject()));
3602 }

◆ mkStar()

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

Take the Kleene star of a regular expression.

Definition at line 2418 of file Context.java.

2419 {
2420 checkContextMatch(re);
2421 return (ReExpr<R>) Expr.create(this, Native.mkReStar(nCtx(), re.getNativeObject()));
2422 }

◆ 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
#mkArraySort(Sort[], R)
#mkSelect(Expr<ArraySort<D, R>> a, Expr<D> i)

Definition at line 1915 of file Context.java.

1916 {
1917 checkContextMatch(a);
1918 checkContextMatch(i);
1919 checkContextMatch(v);
1920 return new ArrayExpr<>(this, Native.mkStore(nCtx(), a.getNativeObject(),
1921 i.getNativeObject(), v.getNativeObject()));
1922 }

◆ 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
#mkArraySort(Sort[], R)
#mkSelect(Expr<ArraySort<D, R>> a, Expr<D> i)

Definition at line 1940 of file Context.java.

1941 {
1942 checkContextMatch(a);
1943 checkContextMatch(args);
1944 checkContextMatch(v);
1945 return new ArrayExpr<>(this, Native.mkStoreN(nCtx(), a.getNativeObject(),
1946 args.length, AST.arrayToNative(args), v.getNativeObject()));
1947 }

◆ mkString()

SeqExpr< CharSort > mkString ( String  s)
inline

Create a string constant.

Definition at line 2162 of file Context.java.

2163 {
2164 StringBuilder buf = new StringBuilder();
2165 for (int i = 0; i < s.length(); i += Character.charCount(s.codePointAt(i))) {
2166 int code = s.codePointAt(i);
2167 if (code <= 32 || 127 < code)
2168 buf.append(String.format("\\u{%x}", code));
2169 else
2170 buf.append(s.charAt(i));
2171 }
2172 return (SeqExpr<CharSort>) Expr.create(this, Native.mkString(nCtx(), buf.toString()));
2173 }

◆ 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 2267 of file Context.java.

2268 {
2269 checkContextMatch(s1, s2);
2270 return new BoolExpr(this, Native.mkStrLe(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2271 }

◆ 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 2258 of file Context.java.

2259 {
2260 checkContextMatch(s1, s2);
2261 return new BoolExpr(this, Native.mkStrLt(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2262 }

◆ mkStringSort()

SeqSort< CharSort > mkStringSort ( )
inline

Create a new string sort

Definition at line 251 of file Context.java.

252 {
253 return new SeqSort<>(this, Native.mkStringSort(nCtx()));
254 }

◆ mkSub()

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

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

Definition at line 1005 of file Context.java.

1006 {
1007 checkContextMatch(t);
1008 return (ArithExpr<R>) Expr.create(this,
1009 Native.mkSub(nCtx(), t.length, AST.arrayToNative(t)));
1010 }

◆ mkSuffixOf()

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

Check for sequence suffix.

Definition at line 2239 of file Context.java.

2240 {
2241 checkContextMatch(s1, s2);
2242 return (BoolExpr)Expr.create(this, Native.mkSeqSuffix(nCtx(), s1.getNativeObject(), s2.getNativeObject()));
2243 }

◆ 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 3104 of file Context.java.

3105 {
3106 return new Tactic(this, name);
3107 }

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 1995 of file Context.java.

1996 {
1997 checkContextMatch(array);
1998 return (Expr<R>) Expr.create(this,
1999 Native.mkArrayDefault(nCtx(), array.getNativeObject()));
2000 }

◆ 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 2399 of file Context.java.

2400 {
2401 checkContextMatch(s);
2402 return (ReExpr<SeqSort<R>>) Expr.create(this, Native.mkSeqToRe(nCtx(), s.getNativeObject()));
2403 }

◆ 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 4436 of file Context.java.

4436 {
4437 return (FuncDecl<BoolSort>) FuncDecl.create(
4438 this,
4439 Native.mkTransitiveClosure(
4440 nCtx(),
4441 f.getNativeObject()
4442 )
4443 );
4444 }

◆ mkTrue()

BoolExpr mkTrue ( )
inline

The true Term.

Definition at line 856 of file Context.java.

857 {
858 return new BoolExpr(this, Native.mkTrue(nCtx()));
859 }

Referenced by Goal.AsBoolExpr().

◆ mkTupleSort()

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

Create a new tuple sort.

Definition at line 276 of file Context.java.

278 {
279 checkContextMatch(name);
280 checkContextMatch(fieldNames);
281 checkContextMatch(fieldSorts);
282 return new TupleSort(this, name, fieldNames.length, fieldNames,
283 fieldSorts);
284 }
TupleSort(name, sorts, ctx=None)
Definition z3py.py:5592

◆ 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 494 of file Context.java.

495 {
496 return mkTypeVariable(mkSymbol(name));
497 }
TypeVarSort mkTypeVariable(Symbol name)
Definition Context.java:482

◆ 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 482 of file Context.java.

483 {
484 checkContextMatch(name);
485 return new TypeVarSort(this, name);
486 }

◆ mkUnaryMinus()

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

Create an expression representing -t.

Definition at line 1015 of file Context.java.

1016 {
1017 checkContextMatch(t);
1018 return (ArithExpr<R>) Expr.create(this,
1019 Native.mkUnaryMinus(nCtx(), t.getNativeObject()));
1020 }

◆ mkUninterpretedSort() [1/2]

UninterpretedSort mkUninterpretedSort ( String  str)
inline

Create a new uninterpreted sort.

Definition at line 198 of file Context.java.

199 {
200 return mkUninterpretedSort(mkSymbol(str));
201 }
UninterpretedSort mkUninterpretedSort(Symbol s)
Definition Context.java:189

◆ mkUninterpretedSort() [2/2]

UninterpretedSort mkUninterpretedSort ( Symbol  s)
inline

Create a new uninterpreted sort.

Definition at line 189 of file Context.java.

190 {
191 checkContextMatch(s);
192 return new UninterpretedSort(this, s);
193 }

◆ mkUnion()

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

Create the union of regular languages.

Definition at line 2490 of file Context.java.

2491 {
2492 checkContextMatch(t);
2493 return (ReExpr<R>) Expr.create(this, Native.mkReUnion(nCtx(), t.length, AST.arrayToNative(t)));
2494 }

◆ mkUnit()

final< R extends Sort > SeqExpr< R > mkUnit ( Expr< R >  elem)
inline

Create the singleton sequence.

Definition at line 2153 of file Context.java.

2154 {
2155 checkContextMatch(elem);
2156 return (SeqExpr<R>) Expr.create(this, Native.mkSeqUnit(nCtx(), elem.getNativeObject()));
2157 }

◆ 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 564 of file Context.java.

566 {
567 return (Expr<R>) Expr.create(this,
568 Native.datatypeUpdateField
569 (nCtx(), field.getNativeObject(),
570 t.getNativeObject(), v.getNativeObject()));
571 }

◆ mkXor()

BoolExpr mkXor ( Expr< BoolSort t1,
Expr< BoolSort t2 
)
inline

Create an expression representing t1 xor t2.

Definition at line 949 of file Context.java.

950 {
951 checkContextMatch(t1);
952 checkContextMatch(t2);
953 return new BoolExpr(this, Native.mkXor(nCtx(), t1.getNativeObject(),
954 t2.getNativeObject()));
955 }

◆ 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 1560 of file Context.java.

1561 {
1562 checkContextMatch(t);
1563 return new BitVecExpr(this, Native.mkZeroExt(nCtx(), i,
1564 t.getNativeObject()));
1565 }

◆ 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 3539 of file Context.java.

3540 {
3541 checkContextMatch(p);
3542 return new Probe(this, Native.probeNot(nCtx(), p.getNativeObject()));
3543 }

◆ 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 3528 of file Context.java.

3529 {
3530 checkContextMatch(p1);
3531 checkContextMatch(p2);
3532 return new Probe(this, Native.probeOr(nCtx(), p1.getNativeObject(),
3533 p2.getNativeObject()));
3534 }

◆ 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 3155 of file Context.java.

3156 {
3157 checkContextMatch(t1);
3158 checkContextMatch(t2);
3159 return new Tactic(this, Native.tacticOrElse(nCtx(),
3160 t1.getNativeObject(), t2.getNativeObject()));
3161 }

◆ 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 3288 of file Context.java.

3289 {
3290 checkContextMatch(t1);
3291 checkContextMatch(t2);
3292 return new Tactic(this, Native.tacticParAndThen(nCtx(),
3293 t1.getNativeObject(), t2.getNativeObject()));
3294 }

◆ 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 3277 of file Context.java.

3278 {
3279 checkContextMatch(t);
3280 return new Tactic(this, Native.tacticParOr(nCtx(),
3281 Tactic.arrayLength(t), Tactic.arrayToNative(t)));
3282 }

◆ 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
#parseSMTLIB2String

Definition at line 3031 of file Context.java.

3033 {
3034 int csn = Symbol.arrayLength(sortNames);
3035 int cs = Sort.arrayLength(sorts);
3036 int cdn = Symbol.arrayLength(declNames);
3037 int cd = AST.arrayLength(decls);
3038 if (csn != cs || cdn != cd)
3039 throw new Z3Exception("Argument size mismatch");
3040 ASTVector v = new ASTVector(this, Native.parseSmtlib2File(nCtx(),
3041 fileName, AST.arrayLength(sorts),
3042 Symbol.arrayToNative(sortNames), AST.arrayToNative(sorts),
3043 AST.arrayLength(decls), Symbol.arrayToNative(declNames),
3044 AST.arrayToNative(decls)));
3045 return v.ToBoolExprArray();
3046 }

◆ 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 3010 of file Context.java.

3012 {
3013 int csn = Symbol.arrayLength(sortNames);
3014 int cs = Sort.arrayLength(sorts);
3015 int cdn = Symbol.arrayLength(declNames);
3016 int cd = AST.arrayLength(decls);
3017 if (csn != cs || cdn != cd) {
3018 throw new Z3Exception("Argument size mismatch");
3019 }
3020 ASTVector v = new ASTVector(this, Native.parseSmtlib2String(nCtx(),
3021 str, AST.arrayLength(sorts), Symbol.arrayToNative(sortNames),
3022 AST.arrayToNative(sorts), AST.arrayLength(decls),
3023 Symbol.arrayToNative(declNames), AST.arrayToNative(decls)));
3024 return v.ToBoolExprArray();
3025 }

◆ 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 4453 of file Context.java.

4453 {
4454 return new ASTVector(
4455 this,
4456 Native.polynomialSubresultants(
4457 nCtx(),
4458 p.getNativeObject(),
4459 q.getNativeObject(),
4460 x.getNativeObject()
4461 )
4462 );
4463 }

◆ 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 3208 of file Context.java.

3209 {
3210 checkContextMatch(t);
3211 return new Tactic(this, Native.tacticRepeat(nCtx(),
3212 t.getNativeObject(), max));
3213 }

◆ sbvToString()

SeqExpr< CharSort > sbvToString ( Expr< BitVecSort e)
inline

Convert an signed bitvector expression to a string.

Definition at line 2194 of file Context.java.

2195 {
2196 return (SeqExpr<CharSort>) Expr.create(this, Native.mkSbvToStr(nCtx(), e.getNativeObject()));
2197 }

◆ 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 2973 of file Context.java.

2974 {
2975 Native.setAstPrintMode(nCtx(), value.toInt());
2976 }

◆ SimplifyHelp()

String SimplifyHelp ( )
inline

Return a string describing all available parameters to Expr.Simplify.

Definition at line 4501 of file Context.java.

4502 {
4503 return Native.simplifyGetHelp(nCtx());
4504 }

◆ skip()

Tactic skip ( )
inline

Create a tactic that just returns the given goal.

Definition at line 3218 of file Context.java.

3219 {
3220 return new Tactic(this, Native.tacticSkip(nCtx()));
3221 }

◆ stringToInt()

IntExpr stringToInt ( Expr< SeqSort< CharSort > >  e)
inline

Convert an integer expression to a string.

Definition at line 2202 of file Context.java.

2203 {
2204 return (IntExpr) Expr.create(this, Native.mkStrToInt(nCtx(), e.getNativeObject()));
2205 }

◆ 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 3378 of file Context.java.

3379 {
3380 return andThen(t1, t2, ts);
3381 }
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 3145 of file Context.java.

3146 {
3147 return andThen(t1, t2, ts);
3148 }

◆ 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 3169 of file Context.java.

3170 {
3171 checkContextMatch(t);
3172 return new Tactic(this, Native.tacticTryFor(nCtx(),
3173 t.getNativeObject(), ms));
3174 }

◆ ubvToString()

SeqExpr< CharSort > ubvToString ( Expr< BitVecSort e)
inline

Convert an unsigned bitvector expression to a string.

Definition at line 2186 of file Context.java.

2187 {
2188 return (SeqExpr<CharSort>) Expr.create(this, Native.mkUbvToStr(nCtx(), e.getNativeObject()));
2189 }

◆ 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
#wrapAST
Parameters
aThe AST to unwrap.

Definition at line 4492 of file Context.java.

4493 {
4494 return a.getNativeObject();
4495 }

◆ 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 4522 of file Context.java.

4523 {
4524 Native.updateParamValue(nCtx(), id, value);
4525 }

◆ 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 3387 of file Context.java.

3388 {
3389 checkContextMatch(t);
3390 checkContextMatch(p);
3391 return new Simplifier(this, Native.simplifierUsingParams(nCtx(),
3392 t.getNativeObject(), p.getNativeObject()));
3393 }

◆ 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 3255 of file Context.java.

3256 {
3257 checkContextMatch(t);
3258 checkContextMatch(p);
3259 return new Tactic(this, Native.tacticUsingParams(nCtx(),
3260 t.getNativeObject(), p.getNativeObject()));
3261 }

◆ 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 3182 of file Context.java.

3183 {
3184 checkContextMatch(t);
3185 checkContextMatch(p);
3186 return new Tactic(this, Native.tacticWhen(nCtx(), p.getNativeObject(),
3187 t.getNativeObject()));
3188 }

◆ 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 3401 of file Context.java.

3402 {
3403 return usingParams(t, p);
3404 }
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 3269 of file Context.java.

3270 {
3271 return usingParams(t, p);
3272 }

◆ 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
#unwrapAST
Parameters
nativeObjectThe native pointer to wrap.

Definition at line 4475 of file Context.java.

4476 {
4477 return AST.create(this, nativeObject);
4478 }