mirror of
https://github.com/Z3Prover/z3
synced 2025-06-14 09:56:15 +00:00
Formatting
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
c4197722bb
commit
c702454f6c
4 changed files with 74 additions and 44 deletions
|
@ -33,7 +33,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public uint NumFields
|
||||
{
|
||||
get { init(); return n; }
|
||||
get
|
||||
{
|
||||
init();
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -41,9 +45,12 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public FuncDecl ConstructorDecl
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<FuncDecl>() != null);
|
||||
init(); return m_constructorDecl; }
|
||||
init();
|
||||
return m_constructorDecl;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -51,9 +58,12 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public FuncDecl TesterDecl
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<FuncDecl>() != null);
|
||||
init(); return m_testerDecl; }
|
||||
init();
|
||||
return m_testerDecl;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -61,9 +71,12 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public FuncDecl[] AccessorDecls
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<FuncDecl[]>() != null);
|
||||
init(); return m_accessorDecls; }
|
||||
init();
|
||||
return m_accessorDecls;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -48,9 +48,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public FuncDecl FuncDecl
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<FuncDecl>() != null);
|
||||
return new FuncDecl(Context, Native.Z3_get_app_decl(Context.nCtx, NativeObject)); }
|
||||
return new FuncDecl(Context, Native.Z3_get_app_decl(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -200,9 +202,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public Sort Sort
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
return Sort.Create(Context, Native.Z3_get_sort(Context.nCtx, NativeObject)); }
|
||||
return Sort.Create(Context, Native.Z3_get_sort(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
#region Constants
|
||||
|
@ -1471,12 +1475,16 @@ namespace Microsoft.Z3
|
|||
#endregion
|
||||
|
||||
#region Internal
|
||||
/// <summary> Constructor for Expr </summary>
|
||||
/// <summary>
|
||||
/// Constructor for Expr
|
||||
/// </summary>
|
||||
internal protected Expr(Context ctx) : base(ctx) { Contract.Requires(ctx != null); }
|
||||
/// <summary> Constructor for Expr </summary>
|
||||
/// <summary>
|
||||
/// Constructor for Expr
|
||||
/// </summary>
|
||||
internal protected Expr(Context ctx, IntPtr obj) : base(ctx, obj) { Contract.Requires(ctx != null); }
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
[Pure]
|
||||
internal override void CheckNativeObject(IntPtr obj)
|
||||
{
|
||||
|
@ -1486,7 +1494,7 @@ namespace Microsoft.Z3
|
|||
throw new Z3Exception("Underlying object is not a term");
|
||||
base.CheckNativeObject(obj);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
[Pure]
|
||||
internal static Expr Create(Context ctx, FuncDecl f, params Expr[] arguments)
|
||||
|
|
|
@ -264,7 +264,8 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieve set of rules added to fixedpoint context.
|
||||
/// </summary>
|
||||
public BoolExpr[] Rules {
|
||||
public BoolExpr[] Rules
|
||||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<BoolExpr[]>() != null);
|
||||
|
@ -281,7 +282,8 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieve set of assertions added to fixedpoint context.
|
||||
/// </summary>
|
||||
public BoolExpr[] Assertions {
|
||||
public BoolExpr[] Assertions
|
||||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<BoolExpr[]>() != null);
|
||||
|
|
|
@ -124,9 +124,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public Sort Range
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
return Sort.Create(Context, Native.Z3_get_range(Context.nCtx, NativeObject)); }
|
||||
return Sort.Create(Context, Native.Z3_get_range(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -142,9 +144,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public Symbol Name
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Symbol>() != null);
|
||||
return Symbol.Create(Context, Native.Z3_get_decl_name(Context.nCtx, NativeObject)); }
|
||||
return Symbol.Create(Context, Native.Z3_get_decl_name(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -280,7 +284,8 @@ namespace Microsoft.Z3
|
|||
}
|
||||
|
||||
#region Internal
|
||||
internal FuncDecl(Context ctx, IntPtr obj) : base(ctx, obj)
|
||||
internal FuncDecl(Context ctx, IntPtr obj)
|
||||
: base(ctx, obj)
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
}
|
||||
|
@ -304,14 +309,14 @@ namespace Microsoft.Z3
|
|||
Contract.Requires(range != null);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
internal override void CheckNativeObject(IntPtr obj)
|
||||
{
|
||||
if (Native.Z3_get_ast_kind(Context.nCtx, obj) != (uint)Z3_ast_kind.Z3_FUNC_DECL_AST)
|
||||
throw new Z3Exception("Underlying object is not a function declaration");
|
||||
base.CheckNativeObject(obj);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
@ -319,8 +324,10 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public Expr this[params Expr[] args] {
|
||||
get {
|
||||
public Expr this[params Expr[] args]
|
||||
{
|
||||
get
|
||||
{
|
||||
Contract.Requires(args == null || Contract.ForAll(args, a => a != null));
|
||||
|
||||
return Apply(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue