public static Effects MakeThrows(int nArgs, int nLocals) { return(new Effects (ReadWriteVectorDomain.FromSameElement(ReadWriteDomain.Bottom, nArgs), ReadWriteVectorDomain.FromSameElement(ReadWriteDomain.Bottom, nLocals), ReadWriteDomain.Bottom, BooleanDomain.Top)); }
public static Effects MakeArgLocalHeap(int nArgs, int nLocals, bool isWrite, bool couldThrow) { return(new Effects (ReadWriteVectorDomain.FromSameElement(new ReadWriteDomain(true, isWrite), nArgs), ReadWriteVectorDomain.FromSameElement(new ReadWriteDomain(true, isWrite), nLocals), new ReadWriteDomain(true, isWrite), new BooleanDomain(couldThrow))); }
public Effects(IntSet argsIsRead, IntSet argsIsWrite, IntSet localsIsRead, IntSet localsIsWrite, bool heapIsRead, bool heapIsWrite, bool exceptions) { Args = new ReadWriteVectorDomain(argsIsRead, argsIsWrite); Locals = new ReadWriteVectorDomain(localsIsRead, localsIsWrite); Heap = new ReadWriteDomain(heapIsRead, heapIsWrite); MayThrow = new BooleanDomain(exceptions); }
public Effects (ReadWriteVectorDomain args, ReadWriteVectorDomain locals, ReadWriteDomain heap, BooleanDomain mayThrow) { Args = args; Locals = locals; Heap = heap; MayThrow = mayThrow; }
public static Effects MakeArgLocal(int nArgs, int nLocals, ArgLocal argLocal, int index, bool isWrite, bool couldThrow) { switch (argLocal) { case ArgLocal.Arg: return(new Effects (ReadWriteVectorDomain.FromSameElementExcept (ReadWriteDomain.Bottom, nArgs, new ReadWriteDomain(true, isWrite), index), ReadWriteVectorDomain.FromSameElement(ReadWriteDomain.Bottom, nLocals), ReadWriteDomain.Bottom, new BooleanDomain(couldThrow))); case ArgLocal.Local: return(new Effects (ReadWriteVectorDomain.FromSameElement(ReadWriteDomain.Bottom, nArgs), ReadWriteVectorDomain.FromSameElementExcept (ReadWriteDomain.Bottom, nLocals, new ReadWriteDomain(true, isWrite), index), ReadWriteDomain.Bottom, new BooleanDomain(couldThrow))); default: throw new ArgumentOutOfRangeException("argLocal"); } }