Beispiel #1
0
        List <Cmd> ProcessAssign(AssignCmd cmd)
        {
            var ret = new List <Cmd>();

            var reads = new GatherMemAccesses();

            cmd.Lhss.Iter(e => reads.VisitExpr(e.AsExpr));
            cmd.Rhss.Iter(e => reads.VisitExpr(e));
            foreach (var tup in reads.accesses)
            {
                ret.AddRange(MkAssert(tup.Item2));
            }

            ret.Add(cmd);

            return(ret);
        }
Beispiel #2
0
        List <Cmd> ProcessAssume(AssumeCmd cmd)
        {
            var ret = new List <Cmd>();

            var gm = new GatherMemAccesses();

            gm.VisitExpr(cmd.Expr);
            foreach (var tup in gm.accesses)
            {
                ret.AddRange(MkAssert(tup.Item2));
            }
            ret.Add(cmd);
            return(ret);
        }
Beispiel #3
0
        List <Cmd> ProcessCall(CallCmd cmd)
        {
            var ret = new List <Cmd>();

            var gm = new GatherMemAccesses();

            cmd.Ins.Where(e => e != null).Iter(e => gm.VisitExpr(e));

            foreach (var tup in gm.accesses)
            {
                ret.AddRange(MkAssert(tup.Item2));
            }
            ret.Add(cmd);

            return(ret);
        }