From 5fc3e23ae51ffc5f4ebba417bd19c53bf6e32c74 Mon Sep 17 00:00:00 2001 From: cfreksen Date: Mon, 30 Oct 2017 00:00:35 +0100 Subject: [PATCH] Improve presentation. --- stepper.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stepper.py b/stepper.py index 8c70b6c..1edf7e4 100644 --- a/stepper.py +++ b/stepper.py @@ -22,6 +22,9 @@ def warn(msg): class Garbage(Enum): GARBAGE = '<>' + def __repr__(self): + return '<>' + def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, heap, tdecs, fdecs, call_res): @@ -347,6 +350,8 @@ def ty2base_ty(ty, tdecs, seen=[]): if isinstance(ty, ll.SimpleType): return ty elif isinstance(ty, ll.PointerType): + # TODO: Consider if types behind pointers should not be + # expanded. They might be allowed for cyclic types return ll.PointerType(ty2base_ty(ty.inner_ty, tdecs, seen)) if isinstance(ty, ll.StructType): return ll.StructType([ty2base_ty(t, tdecs, seen) @@ -424,8 +429,10 @@ define i64 @tigermain (i64 %U_mainSL_8, i64 %U_mainDummy_9) { fdecs, call_res) step_cnt += 1 if terminator is None: - print('Stepping done! Final ssa_env:\n{}' + print('Stepping done!\nFinal ssa_env: {}' .format(ssa_env)) + print('Final heap: {}' + .format(heap)) print('Program resulted in {}'. format(insns[0][1].val)) break