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

Implement @ethdebug/pointers TypeScript package to serve as debugger-side reference implementation of ethdebug/format pointers #90

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

gnidan
Copy link
Member

@gnidan gnidan commented Jun 16, 2024

This reference implementation provides a dereference(pointer) function, along with associated types.

Details

  • Define new package @ethdebug/pointers

    • Setup TS build system and Jest test suite
    • Ensure yarn start includes those
  • Define Pointer family of TypeScript types

    • Use namespaces to reflect schema hierarchy (Pointer.Region, etc.)
    • Provide type guards for detecting conformance to these types
  • Define Machine and Machine.State interfaces to adapt external EVMs

  • Define Cursor interface for inspecting machine state for a pointer

    • Include view(state: Machine.State): Promise<Cursor.Regions>
    • Define Cursor.Region as a region with all expressions evaluated
    • Define Cursor.Regions as an array-like collection of regions
  • Implement read functionality for a Cursor.Region

  • Implement evaluate functionality for a Pointer.Expression

  • Implement dereference functionality to get a Cursor from a Pointer

  • Include integration tests that use solc and Ganache to ensure expected pointer changes occur over the lifetime of an actual transaction

@gnidan gnidan force-pushed the pointers branch 2 times, most recently from e8fde06 to 42f7e4a Compare June 17, 2024 04:27
- Define new package @ethdebug/pointers
  - Setup TS build system and Jest test suite
  - Ensure `yarn start` includes those

- Define Pointer family of TypeScript types
  - Use namespaces to reflect schema hierarchy (Pointer.Region, etc.)
  - Provide type guards for detecting conformance to these types

- Define Machine and Machine.State interfaces to adapt external EVMs

- Define Cursor interface for inspecting machine state for a pointer
  - Include `view(state: Machine.State): Promise<Cursor.Regions>`
  - Define Cursor.Region as a region with all expressions evaluated
  - Define Cursor.Regions as an array-like collection of regions

- Implement read functionality for a Cursor.Region

- Implement evaluate functionality for a Pointer.Expression

- Implement dereference functionality to get a Cursor from a Pointer

- Include integration tests that use solc and Ganache to ensure expected
  pointer changes occur over the lifetime of an actual transaction
@gnidan gnidan marked this pull request as ready for review June 17, 2024 04:40
@gnidan gnidan merged commit 9c335cc into main Jun 20, 2024
4 checks passed
@gnidan gnidan deleted the pointers branch June 20, 2024 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant