private List <Cmd> GenArrayBoundChecks(bool onlyLower, AccessRecord ar, int arrDim)
        {
            List <Cmd> boundChecks = new List <Cmd>();

            var ArrayOffset = verifier.FindOrCreateArrayOffsetVariable(ar.v.Name);

            boundChecks.Add(new AssignCmd(Token.NoToken,
                                          new List <AssignLhs> {
                new SimpleAssignLhs(Token.NoToken, Expr.Ident(ArrayOffset))
            },
                                          new List <Expr> {
                ar.Index
            }));

            boundChecks.Add(new AssumeCmd(Token.NoToken, Expr.True,
                                          new QKeyValue(Token.NoToken, "do_not_predicate", new List <object> {
            },
                                                        new QKeyValue(Token.NoToken, "check_id", new List <object> {
                "bounds_check_state_" + ArraySourceID
            },
                                                                      new QKeyValue(Token.NoToken, "captureState", new List <object> {
                "bounds_check_state_" + ArraySourceID
            },
                                                                                    null)))));
            boundChecks.Add(GenBoundCheck(BOUND_TYPE.LOWER, ar, arrDim, ArrayOffset));

            if (!onlyLower)
            {
                boundChecks.Add(GenBoundCheck(BOUND_TYPE.UPPER, ar, arrDim, ArrayOffset));
            }

            ArraySourceID++;
            return(boundChecks);
        }