Skip to content

Commit aa0b9a6

Browse files
committed
bug in 32bit pcode
1 parent 4ecf328 commit aa0b9a6

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/kdrag/contrib/pcode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def init_mem(self) -> MemState:
585585
>>> ctx.get_reg(memstate, "RAX")
586586
RAX!...
587587
"""
588-
memstate = MemState.Const("mem0")
588+
memstate = MemState.Const("mem0", bits=self.bits)
589589
free_offset = 0
590590
for name, vnode in self.ctx.registers.items():
591591
# interestingness heuristic on length of name

src/kdrag/contrib/pcode/asmspec.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,31 @@
2929
.pushsection .asmspec,"a"
3030
.ascii "\kind \label \"\expr\" \n"
3131
.popsection
32-
\label:
32+
\label :
3333
.endm
3434
3535
# symbolic execution start points and precondition
3636
.macro kd_entry label smt_bool
37-
kd_boolstmt "kd_entry" \label \smt_bool
37+
kd_boolstmt "kd_entry" \label, \smt_bool
3838
.endm
3939
4040
# Assert properties
4141
.macro kd_assert label smt_bool
42-
kd_boolstmt "kd_assert" \label \smt_bool
42+
kd_boolstmt "kd_assert" \label, \smt_bool
4343
.endm
4444
4545
.macro kd_assume label smt_bool
46-
kd_boolstmt "kd_assume" \label \smt_bool
46+
kd_boolstmt "kd_assume" \label, \smt_bool
4747
.endm
4848
4949
# symbolic execution end points and postcondition
5050
.macro kd_exit label smt_bool
51-
kd_boolstmt "kd_entry" \label \smt_bool
51+
kd_boolstmt "kd_entry" \label, \smt_bool
5252
.endm
5353
5454
# invariant
5555
.macro kd_cut label smt_bool
56-
kd_boolstmt "kd_cut" \label \smt_bool
56+
kd_boolstmt "kd_cut" \label, \smt_bool
5757
.endm
5858
5959
# For manipulation of executor ghost state. Often for saving values

src/kdrag/kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __hash__(self) -> int:
4747
return hash(self.thm)
4848

4949
def _repr_html_(self):
50-
return "⊦" + repr(self.thm)
50+
return "⊨" + repr(self.thm)
5151

5252
def __repr__(self):
5353
return "|= " + repr(self.thm)

src/kdrag/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,7 @@ def has_right(self) -> bool:
783783
class Zipper:
784784
"""
785785
A zipper for traversing and modifying terms. The Zipper retains a context stack of "holes" and the current term.
786+
https://en.wikipedia.org/wiki/Zipper_(data_structure)
786787
787788
>>> x,y,z = smt.Ints("x y z")
788789
>>> t = smt.Lambda([x,y], (x + y) * (y + z))

0 commit comments

Comments
 (0)