Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Aug 27, 2024
1 parent 99101b6 commit cc01f51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/halmos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
Path,
SMTQuery,
State,
StorageData,
con_addr,
jumpid_str,
mnemonic,
Expand Down
11 changes: 8 additions & 3 deletions src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ class Storage:
class SolidityStorage(Storage):
@classmethod
def mk_storagedata(cls) -> StorageData:
return StorageData(mapping = defaultdict(lambda: defaultdict(dict)))
return StorageData(mapping=defaultdict(lambda: defaultdict(dict)))

@classmethod
def empty(cls, addr: BitVecRef, slot: int, keys: tuple) -> ArrayRef:
Expand All @@ -1144,7 +1144,9 @@ def empty(cls, addr: BitVecRef, slot: int, keys: tuple) -> ArrayRef:
)

@classmethod
def init(cls, ex: Exec, addr: Any, slot: int, keys: tuple, num_keys: int, size_keys: int) -> None:
def init(
cls, ex: Exec, addr: Any, slot: int, keys: tuple, num_keys: int, size_keys: int
) -> None:
"""
Initialize ex.storage[addr].mapping[slot][num_keys][size_keys], if not yet initialized
"""
Expand All @@ -1164,7 +1166,10 @@ def init(cls, ex: Exec, addr: Any, slot: int, keys: tuple, num_keys: int, size_k

# size_keys == 0
mapping[size_keys] = (
BitVec(f"storage_{id_str(addr)}_{slot}_{num_keys}_{size_keys}_00", BitVecSort256)
BitVec(
f"storage_{id_str(addr)}_{slot}_{num_keys}_{size_keys}_00",
BitVecSort256,
)
if storage_data.symbolic
else ZERO
)
Expand Down

0 comments on commit cc01f51

Please sign in to comment.