예제 #1
0
 /// <summary>
 /// Check for regular expression membership.
 /// </summary>
 public BoolExpr MkInRe(SeqExpr s, ReExpr re)
 {
     Contract.Requires(s != null);
     Contract.Requires(re != null);
     Contract.Ensures(Contract.Result<BoolExpr>() != null);
     CheckContextMatch(s, re);
     return new BoolExpr(this, Native.Z3_mk_seq_in_re(nCtx, s.NativeObject, re.NativeObject));            
 }
예제 #2
0
 /// <summary>
 /// Replace the first occurrence of src by dst in s.
 /// </summary>
 public SeqExpr MkReplace(SeqExpr s, SeqExpr src, SeqExpr dst)
 {
     Contract.Requires(s != null);
     Contract.Requires(src != null);
     Contract.Requires(dst != null);
     Contract.Ensures(Contract.Result<SeqExpr>() != null);
     CheckContextMatch(s, src, dst);
     return new SeqExpr(this, Native.Z3_mk_seq_replace(nCtx, s.NativeObject, src.NativeObject, dst.NativeObject));
 }
예제 #3
0
 /// <summary>
 /// Convert a regular expression that accepts sequence s.
 /// </summary>
 public ReExpr MkToRe(SeqExpr s) 
 {
     Contract.Requires(s != null);
     Contract.Ensures(Contract.Result<ReExpr>() != null);
     return new ReExpr(this, Native.Z3_mk_seq_to_re(nCtx, s.NativeObject));            
 }
예제 #4
0
 /// <summary>
 /// Extract index of sub-string starting at offset.
 /// </summary>
 public IntExpr MkIndexOf(SeqExpr s, SeqExpr substr, ArithExpr offset)
 {
     Contract.Requires(s != null);
     Contract.Requires(offset != null);
     Contract.Requires(substr != null);
     Contract.Ensures(Contract.Result<IntExpr>() != null);
     CheckContextMatch(s, substr, offset);
     return new IntExpr(this, Native.Z3_mk_seq_index(nCtx, s.NativeObject, substr.NativeObject, offset.NativeObject));
 }
예제 #5
0
 /// <summary>
 /// Extract subsequence.
 /// </summary>
 public SeqExpr MkExtract(SeqExpr s, IntExpr offset, IntExpr length)
 {
     Contract.Requires(s != null);
     Contract.Requires(offset != null);
     Contract.Requires(length != null);
     Contract.Ensures(Contract.Result<SeqExpr>() != null);
     CheckContextMatch(s, offset, length);
     return new SeqExpr(this, Native.Z3_mk_seq_extract(nCtx, s.NativeObject, offset.NativeObject, length.NativeObject));
 }
예제 #6
0
 /// <summary>
 /// Retrieve sequence of length one at index.
 /// </summary>
 public SeqExpr MkAt(SeqExpr s, IntExpr index)
 {
     Contract.Requires(s != null);
     Contract.Requires(index != null);
     Contract.Ensures(Contract.Result<SeqExpr>() != null);
     CheckContextMatch(s, index);
     return new SeqExpr(this, Native.Z3_mk_seq_at(nCtx, s.NativeObject, index.NativeObject));
 }
예제 #7
0
 /// <summary>
 /// Check for sequence containment of s2 in s1.
 /// </summary>
 public BoolExpr MkContains(SeqExpr s1, SeqExpr s2) 
 {
     Contract.Requires(s1 != null);
     Contract.Requires(s2 != null);
     Contract.Ensures(Contract.Result<BoolExpr>() != null);
     CheckContextMatch(s1, s2);
     return new BoolExpr(this, Native.Z3_mk_seq_contains(nCtx, s1.NativeObject, s2.NativeObject));
 }
예제 #8
0
 /// <summary>
 /// Retrieve the length of a given sequence.
 /// </summary>
 public IntExpr MkLength(SeqExpr s)
 {
     Contract.Requires(s != null);
     Contract.Ensures(Contract.Result<IntExpr>() != null);
     return (IntExpr) Expr.Create(this, Native.Z3_mk_seq_length(nCtx, s.NativeObject));
 }