Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Sep 12, 2023
1 parent bd2c78c commit daee470
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,9 @@ def decode(cls, loc: Any) -> Any:

@classmethod
def simple_hash(cls, x: BitVecRef) -> BitVecRef:
# simple injective function for collision-free (though not secure) hash semantics, comprising:
# - left-shift by 256 bits to ensure sufficient logical domain space
# - an additional 1-bit for disambiguation (e.g., between map[key] vs array[i][j])
return simplify(Concat(x, con(0, 257)))

@classmethod
Expand Down

0 comments on commit daee470

Please sign in to comment.