Package com.microsoft.z3
Class AST
java.lang.Object
com.microsoft.z3.Z3Object
com.microsoft.z3.AST
- All Implemented Interfaces:
Comparable<AST>
The abstract syntax tree (AST) class.
-
Method Summary
Modifier and TypeMethodDescriptionintObject Comparison.booleanObject comparison.The kind of the AST.intgetId()A unique identifier for the AST (unique among all ASTs).getSExpr()A string representation of the AST in s-expression notation.inthashCode()The AST's hash code.booleanisApp()Indicates whether the AST is an applicationbooleanisExpr()Indicates whether the AST is an ExprbooleanIndicates whether the AST is a FunctionDeclarationbooleanIndicates whether the AST is a QuantifierbooleanisSort()Indicates whether the AST is a SortbooleanisVar()Indicates whether the AST is a BoundVariable.toString()A string representation of the AST.Translates (copies) the AST to the Contextctx.Methods inherited from class com.microsoft.z3.Z3Object
arrayLength, arrayToNative
-
Method Details
-
equals
Object comparison. -
compareTo
Object Comparison.- Specified by:
compareToin interfaceComparable<AST>- Parameters:
other- Another AST- Returns:
- Negative if the object should be sorted before
other, positive if after else zero. - Throws:
Z3Exception- on error
-
hashCode
public int hashCode()The AST's hash code. -
getId
public int getId()A unique identifier for the AST (unique among all ASTs).- Throws:
Z3Exception- on error
-
translate
Translates (copies) the AST to the Contextctx.- Parameters:
ctx- A context- Returns:
- A copy of the AST which is associated with
ctx - Throws:
Z3Exception- on error
-
getASTKind
The kind of the AST.- Throws:
Z3Exception- on error
-
isExpr
public boolean isExpr()Indicates whether the AST is an Expr- Throws:
Z3Exception- on errorZ3Exception- on error
-
isApp
public boolean isApp()Indicates whether the AST is an application- Returns:
- a boolean
- Throws:
Z3Exception- on error
-
isVar
public boolean isVar()Indicates whether the AST is a BoundVariable.- Returns:
- a boolean
- Throws:
Z3Exception- on error
-
isQuantifier
public boolean isQuantifier()Indicates whether the AST is a Quantifier- Returns:
- a boolean
- Throws:
Z3Exception- on error
-
isSort
public boolean isSort()Indicates whether the AST is a Sort -
isFuncDecl
public boolean isFuncDecl()Indicates whether the AST is a FunctionDeclaration -
toString
A string representation of the AST. -
getSExpr
A string representation of the AST in s-expression notation.
-