Skip to content

Program frame contexts are devoid of semantic meaning #152

@gnidan

Description

@gnidan

The ethdebug/format/program/context schema allows associating contexts with arbitrary "frame" string values, e.g., to indicate with "frame": "ir" that the context refers to Yul sources instead of Solidity sources.

Currently, this format doesn't cover the scope of what makes a valid value for a frame, i.e., the format treats "frame": "..." as an opaque string. Not providing semantic guidance here creates the risk that different compilers will use different values for effectively the same idea (e.g., "yul" vs. "ir" vs. "IR", etc.), thus increasing the burden on debuggers to have compiler-specific lookup tables or some other kind of heuristics.

This concern was raised in a recent community call discussion, where we mostly concluded that establishing semantics here is tricky.

One idea I've had for addressing this concern: update the format to require compilers to include a static list of possible frame values in the ethdebug/fomaterials/compilation schema output. I could see this being useful especially if we could define semantics enough to say, e.g., "{ "frame": "yul" } indicates an intermediary representation whose sources are in the Yul language"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions