Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fixed some minor typos #1319

Merged
merged 1 commit into from Jul 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/python_vm/README.md
Expand Up @@ -20,7 +20,7 @@ The memory itself is a list of continuous segments, the size of each segment may

The different segments:
* Program Segment: Contains cairo bytecode. pc starts at the beginning of this segment
* 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.
* 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.
* Builtin Segment: Each builtin has its own continuous area in memory. Length is variable

## Registers
Expand Down Expand Up @@ -53,14 +53,14 @@ The [VirtualMachine](https://github.com/starkware-libs/cairo-lang/blob/b614d1867
* [`run_context`](#context)
* `program` : [ProgramBase](#progbase)
* `program_base` : Optional(MaybeRelocatable)(if none, it is set to run_context.pc)
* `builtin_runners` (Optional Dict or set to {})
* `hint_locals` (Dict)
* `static_locals`(Optional Dict)
* `builtin_runners` : (Optional Dict or set to {})
* `hint_locals` : (Dict)
* `static_locals` : (Optional Dict)
VirtualMachineBase's init is used to set these values (plus other ones), the next ones are exclusive to the VirtualMachine:
* `accessed_addresses` (Set that keeps track of memory adresses accessed by cairo instructions)
* `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))
* `current_step` (initialized with 0)
* `skip_instruction_execution` (= False), used by hints to skip execution of current step
* `accessed_addresses` : (Set that keeps track of memory adresses accessed by cairo instructions)
* `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))
* `current_step` : (initialized with 0)
* `skip_instruction_execution` : (= False), used by hints to skip execution of current step

Functions:
* `[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)
Expand Down