diff --git a/src/api/dotnet/AST.cs b/src/api/dotnet/AST.cs index 2c4c964df..7bc4f6dfb 100644 --- a/src/api/dotnet/AST.cs +++ b/src/api/dotnet/AST.cs @@ -149,6 +149,14 @@ namespace Microsoft.Z3 } } + /// + /// Indicates whether the AST is an application + /// + public bool IsApp + { + get { return this.ASTKind == Z3_ast_kind.Z3_APP_AST; } + } + /// /// Indicates whether the AST is a BoundVariable /// diff --git a/src/api/dotnet/Expr.cs b/src/api/dotnet/Expr.cs index 9f5c04f0b..b2927e2c3 100644 --- a/src/api/dotnet/Expr.cs +++ b/src/api/dotnet/Expr.cs @@ -215,7 +215,7 @@ namespace Microsoft.Z3 /// public bool IsConst { - get { return IsExpr && NumArgs == 0 && FuncDecl.DomainSize == 0; } + get { return IsApp && NumArgs == 0 && FuncDecl.DomainSize == 0; } } #endregion