- NTuple<Descriptor> readingHeapPath = new NTuple<Descriptor>(srcHeapPath.getList());
- readingHeapPath.add(fld);
- mapHeapPath.put(lhs, readingHeapPath);
-
- // read (x.f)
- if (fld.getType().isImmutable()) {
- // if WT doesnot have hp(x.f), add hp(x.f) to READ
- if (!writtenSet.contains(readingHeapPath)) {
- readSet.add(readingHeapPath);
+ if (srcHeapPath != null) {
+ // if lhs srcHeapPath is null, it means that it is not reachable from
+ // callee's parameters. so just ignore it
+
+ NTuple<Descriptor> readingHeapPath = new NTuple<Descriptor>(srcHeapPath.getList());
+ readingHeapPath.add(fld);
+ mapHeapPath.put(lhs, readingHeapPath);
+
+ // read (x.f)
+ if (fld.getType().isImmutable()) {
+ // if WT doesnot have hp(x.f), add hp(x.f) to READ
+ if (!writtenSet.contains(readingHeapPath)) {
+ readSet.add(readingHeapPath);
+ }