Ejemplo n.º 1
0
        protected Expr Visit(Expr e)
        {
            // Handle Expressions that are of different types
            if (e is NAryExpr)
            {
                return(HandleNAry(e as NAryExpr));
            }
            else if (e is LiteralExpr)
            {
                return(Visitor.VisitLiteralExpr(e as LiteralExpr));
            }
            else if (e is IdentifierExpr)
            {
                return(Visitor.VisitIdentifierExpr(e as IdentifierExpr));
            }
            else if (e is OldExpr)
            {
                return(Visitor.VisitOldExpr(e as OldExpr));
            }
            else if (e is CodeExpr)
            {
                return(Visitor.VisitCodeExpr(e as CodeExpr));
            }
            else if (e is BvExtractExpr)
            {
                return(Visitor.VisitBvExtractExpr(e as BvExtractExpr));
            }
            else if (e is BvConcatExpr)
            {
                return(Visitor.VisitBvConcatExpr(e as BvConcatExpr));
            }
            else if (e is ForallExpr)
            {
                return(Visitor.VisitForallExpr(e as ForallExpr));
            }
            else if (e is ExistsExpr)
            {
                return(Visitor.VisitExistExpr(e as ExistsExpr));
            }
            else if (e is LambdaExpr)
            {
                return(Visitor.VisitLambdaExpr(e as LambdaExpr));
            }

            throw new NotImplementedException("Expr not supported!");
        }