z3-z3-4.12.6.src.api.dotnet.BoolExpr.cs Maven / Gradle / Ivy
/*++
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
}
}