Z3
StringSymbol.java
Go to the documentation of this file.
1
18package com.microsoft.z3;
19
20import com.microsoft.z3.enumerations.Z3_symbol_kind;
21
25public class StringSymbol extends Symbol
26{
33 {
34 return Native.getSymbolString(getContext().nCtx(), getNativeObject());
35 }
36
37 StringSymbol(Context ctx, long obj)
38 {
39 super(ctx, obj);
40 }
41
42 StringSymbol(Context ctx, String s)
43 {
44 super(ctx, Native.mkStringSymbol(ctx.nCtx(), s));
45 }
46
47 @Override
48 void checkNativeObject(long obj)
49 {
50 if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_STRING_SYMBOL
51 .toInt()) {
52 throw new Z3Exception("Symbol is not of String kind");
53 }
54 super.checkNativeObject(obj);
55 }
56}
static String getSymbolString(long a0, long a1)
Definition: Native.java:2648
def String(name, ctx=None)
Definition: z3py.py:10085
Z3_symbol_kind
The different kinds of symbol. In Z3, a symbol can be represented using integers and strings (See Z3_...
Definition: z3_api.h:114