public static Expr array_bound(Context ctx, String type, String name, Expr f_array_bound) throws Z3Exception{
		if(type.equals("int") || type.equals("double") || type.equals("boolean"))
    		return f_array_bound;
    	else if(type.equals("int_array") || type.equals("double_array")){
    		if(f_array_bound == null)
    			f_array_bound = ctx.MkLe(ctx.MkInt(0), (ArithExpr)ctx.MkConst(name+"_lastIndex", ctx.IntSort()));
    		else
    			f_array_bound = ctx.MkAnd(new BoolExpr[]{(BoolExpr)f_array_bound, 
    									ctx.MkLe(ctx.MkInt(0), (ArithExpr)ctx.MkConst(name+"_lastIndex", ctx.IntSort()))});
    		return f_array_bound;
    	}
    	else{
    		System.out.println("Does not support the input type!");
    		return null;
    	}
	}