mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
expose nth over API, change _getitem_ in python bindings to use nth instead of at, add 'at' operator for the purpose of the previous semantics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f534f79a21
commit
834cf962a1
7 changed files with 66 additions and 1 deletions
|
@ -2454,7 +2454,7 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieve sequence of length one at index.
|
||||
/// </summary>
|
||||
public SeqExpr MkAt(SeqExpr s, IntExpr index)
|
||||
public SeqExpr MkAt(SeqExpr s, Expr index)
|
||||
{
|
||||
Debug.Assert(s != null);
|
||||
Debug.Assert(index != null);
|
||||
|
@ -2462,6 +2462,17 @@ namespace Microsoft.Z3
|
|||
return new SeqExpr(this, Native.Z3_mk_seq_at(nCtx, s.NativeObject, index.NativeObject));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve element at index.
|
||||
/// </summary>
|
||||
public SeqExpr MkNth(SeqExpr s, Expr index)
|
||||
{
|
||||
Debug.Assert(s != null);
|
||||
Debug.Assert(index != null);
|
||||
CheckContextMatch(s, index);
|
||||
return new SeqExpr(this, Native.Z3_mk_seq_nth(nCtx, s.NativeObject, index.NativeObject));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extract subsequence.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue