All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.12.6.src.api.dotnet.BoolExpr.cs Maven / Gradle / Ivy

There is a newer version: 4.13.0.1
Show newest version
/*++
Copyright () 2012 Microsoft Corporation

Module Name:

    BoolExpr.cs

Abstract:

    Z3 Managed API: Boolean Expressions

Author:

    Christoph Wintersteiger (cwinter) 2012-11-23

Notes:
    
--*/
using System.Diagnostics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Microsoft.Z3
{
    /// 
    /// Boolean expressions
    /// 
    public class BoolExpr : Expr
    {
        #region Internal
        ///  Constructor for BoolExpr 
        internal BoolExpr(Context ctx, IntPtr obj) : base(ctx, obj) { Debug.Assert(ctx != null); }
        #endregion

        #region Operators
        ///  Disjunction of Boolean expressions 
        public static BoolExpr operator|(BoolExpr a, BoolExpr b) { return a.Context.MkOr(a, b); }

        ///  Conjunction of Boolean expressions 
        public static BoolExpr operator &(BoolExpr a, BoolExpr b) { return a.Context.MkAnd(a, b); }
       
        ///  Xor of Boolean expressions 
        public static BoolExpr operator ^(BoolExpr a, BoolExpr b) { return a.Context.MkXor(a, b); }
       
        ///  Negation 
        public static BoolExpr operator !(BoolExpr a) { return a.Context.MkNot(a); }

        #endregion
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy