Skip to content

Commit

Permalink
#295, bugfix to NoStoreInfo, now NoStoreInfo also gets Ids (they are …
Browse files Browse the repository at this point in the history
…all negative, to differentiate from normal StoreInfos)
  • Loading branch information
alexandernutz committed Sep 3, 2018
1 parent fe80c9b commit 5f1bb60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class MemlocArrayManager {

private final ComputeStoreInfosAndArrayGroups<?> mCsiag;

private int mNoStoreInfoCounter = -1;

public MemlocArrayManager(final ManagedScript mgdScript,
final ComputeStoreInfosAndArrayGroups<?> computeStoreInfosAndArrayGroups) {
mMgdScript = mgdScript;
Expand Down Expand Up @@ -201,7 +203,7 @@ private HeapSepProgramConst getOrConstructInitLocLitForLocArraySort(final Sort l
result = new HeapSepProgramConst(locLitTerm);
mInitLocLitTermToPvoc.put(locLitTerm, result);
mLocArraySortToInitLocLit.put(locArraySort, result);
mInitLocPvocToNoStoreInfo.put(result, new NoStoreInfo(dim));
mInitLocPvocToNoStoreInfo.put(result, new NoStoreInfo(mNoStoreInfoCounter --));
}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
public class NoStoreInfo extends StoreInfo {

// public NoStoreInfo(final ArrayGroup arrayGroup, final int dim) {
public NoStoreInfo(final int dim) {
public NoStoreInfo(final int id) {
// super(dim, null, null, null, arrayGroup, null, null, null, null);
super(dim, null, null, null, null, null, null, null, null);
super(id, null, null, null, null, null, null, null, null);
}

@Override
public String toString() {
// return String.format("NoStoreIndexInfo_%d_%s", getDimension(), getArrayGroup());
return String.format("NoStoreIndexInfo_%d_%s", getDimension());
// return String.format("NoStoreIndexInfo_%d", getDimension());
return String.format("NoStoreIndexInfo_#%d", getId());
}
}

0 comments on commit 5f1bb60

Please sign in to comment.