Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Lab-Exercise-3/Python/AEMgr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@
" \"\"\"\n",
" assert isinstance(key, int), \"key is not a valid integer, the type of key is {}\".format(type(key))\n",
" assert isinstance(value, AbstractValue) or isinstance(value, IntervalValue) or isinstance(value, AddressValue), \"value is not a valid AbstractValue, IntervalValue, or AddressValue object, the type of value is {}\".format(type(value))\n",
" self.state[key] = value\n",
"\n",
" if isinstance(self, AbstractValue):\n",
" self.state[key] = value\n",
" else:\n",
" self.state[key] = AbstractValue(value)\n",
"\n",
" def printAbstractState(self) -> None:\n",
" \"\"\"\n",
Expand Down Expand Up @@ -275,7 +279,7 @@
" print(\"-----------Var and Value-----------\")\n",
" field_width = 20\n",
"\n",
" for var_id, abs_val in self.state.getVarToVal():\n",
" for var_id, abs_val in self.state.state.getVarToVal():\n",
" var_name = self.id_to_str.get(var_id, \"\")\n",
" var_info = f\"Var{var_id} ({var_name})\"\n",
" print(f\"{var_info:<{field_width}}: \", end=\"\")\n",
Expand All @@ -289,7 +293,7 @@
" else:\n",
" print(\"Value: ⊥\")\n",
"\n",
" for addr, abs_val in self.state.getLocToVal():\n",
" for addr, abs_val in self.state.state.getLocToVal():\n",
" addr_str = f\"0x{self.getVirtualAddr(addr):x}\"\n",
" print(f\"{addr_str:<{field_width}}: \", end=\"\")\n",
"\n",
Expand Down
Loading