Exemplo n.º 1
0
        public void BVConcatExpr()
        {
            var bv1_8 = new LiteralExpr(Token.NoToken, BigNum.FromInt(1), 8);
            var bv2_8 = new LiteralExpr(Token.NoToken, BigNum.FromInt(2), 8);
            var A     = new BvConcatExpr(Token.NoToken, bv1_8, bv2_8);
            var B     = d.Visit(A);

            // The duplicator should ensure we get new BVConcatExprs
            Assert.AreNotSame(A, B);
        }
Exemplo n.º 2
0
 public override Expr VisitIdentifierExpr(IdentifierExpr expr)
 {
     if (!defs.ContainsKey(expr.Decl))
     {
         return(base.VisitIdentifierExpr(expr));
     }
     else if (defs[expr.Decl] == null)
     {
         isSubstitutable = false;
         return(null);
     }
     else
     {
         var dup = new Duplicator();
         return((Expr)dup.Visit(defs[expr.Decl]));
     }
 }