From 3482b8f4f1bcaa6025ca9e731d8cd05b42d91d95 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 10 Jan 2013 18:08:56 +0000 Subject: [PATCH] .NET API: bugfix Signed-off-by: Christoph M. Wintersteiger --- src/api/dotnet/AST.cs | 8 ++++++++ src/api/dotnet/Expr.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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