z3-z3-4.13.0.src.api.dotnet.FPRMNum.cs Maven / Gradle / Ivy
The newest version!
/*++
Copyright (c) 2013 Microsoft Corporation
Module Name:
FPRMExpr.cs
Abstract:
Z3 Managed API: Floating Point Rounding Mode Numerals
Author:
Christoph Wintersteiger (cwinter) 2013-06-10
Notes:
--*/
using System.Diagnostics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Microsoft.Z3
{
///
/// Floating-point rounding mode numerals
///
public class FPRMNum : FPRMExpr
{
///
/// Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven
///
public bool isRoundNearestTiesToEven { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven
///
public bool isRNE { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway
///
public bool isRoundNearestTiesToAway { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway
///
public bool isRNA { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardPositive
///
public bool isRoundTowardPositive { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardPositive
///
public bool isRTP { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardNegative
///
public bool isRoundTowardNegative { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardNegative
///
public bool isRTN { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardZero
///
public bool isRoundTowardZero { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; } }
///
/// Indicates whether the term is the floating-point rounding numeral roundTowardZero
///
public bool isRTZ { get { return IsApp && FuncDecl.DeclKind == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; } }
///
/// Returns a string representation of the numeral.
///
public override string ToString()
{
return Native.Z3_get_numeral_string(Context.nCtx, NativeObject);
}
#region Internal
/// Constructor for FPRMNum
internal FPRMNum(Context ctx, IntPtr obj)
: base(ctx, obj)
{
Debug.Assert(ctx != null);
}
#endregion
}
}