// For each variable Mem to instrument, return: // assume Mem__0 == Mem_s_1 // assume Mem__1 == Mem_s_2 // ... // assume Mem__{K-2} == Mem_s_{K-1} public List <Cmd> constructChecker(int K, InstrumentationPolicy policy) { List <Cmd> cseq = new List <Cmd>(); for (int i = 0; i < K - 1; i++) { foreach (var declg in declaredGlobals) { if (!policy.instrument(declg.Value)) { continue; } var g = declg.Value; cseq.Add(BoogieAstFactory.MkAssumeVarEqVar(GetVarCopy(g, i), GetVarInitCopy(g, i + 1))); } } return(cseq); }
// For each variable Mem to instrument, return: // assume Mem__1 == Mem_s_1 // assume Mem__2 == Mem_s_2 // ... // assume Mem__{K-1} == Mem_s_{K-1} public List <Cmd> constructInitAssumes(int K, InstrumentationPolicy policy) { List <Cmd> cseq = new List <Cmd>(); for (int i = 1; i < K; i++) { foreach (var declg in declaredGlobals) { if (!policy.instrument(declg.Value)) { continue; } var g = declg.Value; // assume Mem__1 == Mem_s_1 ... cseq.Add(BoogieAstFactory.MkAssumeVarEqVar(GetVarCopy(g, i), GetVarInitCopy(g, i))); } } return(cseq); }