Microsoft.Z3.Context.MkExtract C# (CSharp) Méthode

MkExtract() public méthode

Bit-vector extraction.
Extract the bits high down to low from a bitvector of size m to yield a new bitvector of size n, where n = high - low + 1. The argument t must have a bit-vector sort.
public MkExtract ( uint high, uint low, BitVecExpr t ) : BitVecExpr
high uint
low uint
t BitVecExpr
Résultat BitVecExpr
        public BitVecExpr MkExtract(uint high, uint low, BitVecExpr t)
        {
            Contract.Requires(t != null);
            Contract.Ensures(Contract.Result<BitVecExpr>() != null);

            CheckContextMatch(t);
            return new BitVecExpr(this, Native.Z3_mk_extract(nCtx, high, low, t.NativeObject));
        }

Usage Example

Exemple #1
0
    public void Run()
    {
        Dictionary<string, string> cfg = new Dictionary<string, string>() {
            { "AUTO_CONFIG", "true" } };

        Context ctx = new Context(cfg);

        BitVecExpr b = ctx.MkBVConst("b", 16);

        Console.WriteLine(ctx.MkExtract(12, 2, b));
        Console.WriteLine(ctx.MkSignExt(10, b));
        Console.WriteLine(ctx.MkZeroExt(10, b));
        Console.WriteLine(ctx.MkRepeat(3, b));
    }
Context