Z3
IntSymbol.java
Go to the documentation of this file.
1 
18 package com.microsoft.z3;
19 
21 
25 public class IntSymbol extends Symbol
26 {
32  public int getInt()
33  {
34  if (!isIntSymbol())
35  throw new Z3Exception("Int requested from non-Int symbol");
36  return Native.getSymbolInt(getContext().nCtx(), getNativeObject());
37  }
38 
39  IntSymbol(Context ctx, long obj)
40  {
41  super(ctx, obj);
42  }
43 
44  IntSymbol(Context ctx, int i)
45  {
46  super(ctx, Native.mkIntSymbol(ctx.nCtx(), i));
47  }
48 
49  @Override
50  void checkNativeObject(long obj)
51  {
52  if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_INT_SYMBOL
53  .toInt())
54  throw new Z3Exception("Symbol is not of integer kind");
55  super.checkNativeObject(obj);
56  }
57 }
static int getSymbolInt(long a0, long a1)
Definition: Native.java:2294
boolean isIntSymbol()
Definition: Symbol.java:38
static int getSymbolKind(long a0, long a1)
Definition: Native.java:2285
static long mkIntSymbol(long a0, int a1)
Definition: Native.java:867