Skip to content

Commit 24da5e7

Browse files
Partial order for abstract memory
1 parent 475b515 commit 24da5e7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/it/unipr/analysis/AbstractMemory.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,13 @@ else if (i < other.memory.length && other.memory[i].isTop())
258258

259259
@Override
260260
public boolean lessOrEqualAux(AbstractMemory other) {
261-
return false;
261+
for (int i = 0; i < Math.max(this.memory.length, other.memory.length); i++) {
262+
AbstractByte b1 = i < this.memory.length ? this.memory[i] : new AbstractByte(0);
263+
AbstractByte b2 = i < other.memory.length ? other.memory[i] : new AbstractByte(0);
264+
if (!b1.equals(b2) && !b2.isTop())
265+
return false;
266+
}
267+
return true;
262268
}
263269

264270
@Override

0 commit comments

Comments
 (0)