You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/python_vm/README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The memory itself is a list of continuous segments, the size of each segment may
20
20
21
21
The different segments:
22
22
* Program Segment: Contains cairo bytecode. pc starts at the beginning of this segment
23
-
* Execution Segment: Where data is generated during the run of a Cairo program. Lenght is variable(depends on program input). Allocation Pointer (ap) and Frame Pointer (fp) start here.
23
+
* Execution Segment: Where data is generated during the run of a Cairo program. Length is variable(depends on program input). Allocation Pointer (ap) and Frame Pointer (fp) start here.
24
24
* Builtin Segment: Each builtin has its own continuous area in memory. Length is variable
25
25
26
26
## Registers
@@ -53,14 +53,14 @@ The [VirtualMachine](https://github.com/starkware-libs/cairo-lang/blob/b614d1867
53
53
*[`run_context`](#context)
54
54
*`program` : [ProgramBase](#progbase)
55
55
*`program_base` : Optional(MaybeRelocatable)(if none, it is set to run_context.pc)
56
-
*`builtin_runners` (Optional Dict or set to {})
57
-
*`hint_locals` (Dict)
58
-
*`static_locals`(Optional Dict)
56
+
*`builtin_runners`: (Optional Dict or set to {})
57
+
*`hint_locals`: (Dict)
58
+
*`static_locals` : (Optional Dict)
59
59
VirtualMachineBase's init is used to set these values (plus other ones), the next ones are exclusive to the VirtualMachine:
60
-
*`accessed_addresses` (Set that keeps track of memory adresses accessed by cairo instructions)
61
-
*`trace` (List of TraceEntry, that each contain the run_context's pc, ap and fp at that moment. A TraceEntry is added after every instruction (Before update_registers is called))
62
-
*`current_step` (initialized with 0)
63
-
*`skip_instruction_execution` (= False), used by hints to skip execution of current step
60
+
*`accessed_addresses`: (Set that keeps track of memory adresses accessed by cairo instructions)
61
+
*`trace`: (List of TraceEntry, that each contain the run_context's pc, ap and fp at that moment. A TraceEntry is added after every instruction (Before update_registers is called))
62
+
*`current_step`: (initialized with 0)
63
+
*`skip_instruction_execution`: (= False), used by hints to skip execution of current step
64
64
65
65
Functions:
66
66
*`[update_registers(instruction, operands)]`(https://github.com/starkware-libs/cairo-lang/blob/b614d1867c64f3fb2cf4a4879348cfcf87c3a5a7/src/starkware/cairo/lang/vm/vm_core.py#L143): Updates fp, ap, and pc, based on the instruction's [FpUpdate, ApUpdate and PcUpdate](#updatereg)
0 commit comments