mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
overloading support for C# expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
662e43d264
commit
643a87cb5b
2 changed files with 60 additions and 163 deletions
|
@ -36,21 +36,19 @@ namespace Microsoft.Z3
|
|||
#endregion
|
||||
|
||||
#region Operators
|
||||
/// <summary>
|
||||
/// Disjunction of Boolean expressions
|
||||
/// </summary>
|
||||
public static BoolExpr operator|(BoolExpr a, BoolExpr b)
|
||||
{
|
||||
return a.Context.MkOr(a, b);
|
||||
}
|
||||
/// <summary> Disjunction of Boolean expressions </summary>
|
||||
public static BoolExpr operator|(BoolExpr a, BoolExpr b) => a.Context.MkOr(a, b);
|
||||
|
||||
/// <summary>
|
||||
/// Conjunction of Boolean expressions
|
||||
/// </summary>
|
||||
public static BoolExpr operator &(BoolExpr a, BoolExpr b)
|
||||
{
|
||||
return a.Context.MkAnd(a, b);
|
||||
}
|
||||
public static BoolExpr operator &(BoolExpr a, BoolExpr b) => a.Context.MkAnd(a, b);
|
||||
|
||||
/// <summary> Xor of Boolean expressions </summary>
|
||||
public static BoolExpr operator ^(BoolExpr a, BoolExpr b) => a.Context.MkXor(a, b);
|
||||
|
||||
/// <summary> Negation </summary>
|
||||
public static BoolExpr operator !(BoolExpr a) => a.Context.MkNot(a);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue