3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

seq + API

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-04 18:01:48 -08:00
parent 68a532d066
commit c1ebf6b4fc
9 changed files with 484 additions and 77 deletions

View file

@ -125,6 +125,7 @@ namespace Microsoft.Z3
private BoolSort m_boolSort = null;
private IntSort m_intSort = null;
private RealSort m_realSort = null;
private SeqSort m_stringSort = null;
/// <summary>
/// Retrieves the Boolean sort of the context.
@ -163,6 +164,20 @@ namespace Microsoft.Z3
}
}
/// <summary>
/// Retrieves the String sort of the context.
/// </summary>
public SeqSort StringSort
{
get
{
Contract.Ensures(Contract.Result<SeqSort>() != null);
if (m_stringSort == null) m_stringSort = new SeqSort(this, Native.Z3_mk_string_sort(nCtx));
return m_stringSort;
}
}
/// <summary>
/// Create a new Boolean sort.
/// </summary>
@ -223,6 +238,27 @@ namespace Microsoft.Z3
return new BitVecSort(this, Native.Z3_mk_bv_sort(nCtx, size));
}
/// <summary>
/// Create a new sequence sort.
/// </summary>
public SeqSort MkSeqSort(Sort s)
{
Contract.Requires(s != null);
Contract.Ensures(Contract.Result<SeqSort>() != null);
return new SeqSort(this, Native.Z3_mk_seq_sort(nCtx, s.NativeObject));
}
/// <summary>
/// Create a new regular expression sort.
/// </summary>
public ReSort MkReSort(SeqSort s)
{
Contract.Requires(s != null);
Contract.Ensures(Contract.Result<ReSort>() != null);
return new ReSort(this, Native.Z3_mk_re_sort(nCtx, s.NativeObject));
}
/// <summary>
/// Create a new array sort.
/// </summary>
@ -4872,6 +4908,7 @@ namespace Microsoft.Z3
m_boolSort = null;
m_intSort = null;
m_realSort = null;
m_stringSort = null;
}
#endregion
}