Skip to content

pyk: add node_id to custom_step#4907

Open
juliankuners wants to merge 2 commits intodevelopfrom
pyk-pass-node_id-custom_step
Open

pyk: add node_id to custom_step#4907
juliankuners wants to merge 2 commits intodevelopfrom
pyk-pass-node_id-custom_step

Conversation

@juliankuners
Copy link
Copy Markdown
Contributor

This PR adds a new parameter that is passed to custom steps in pyk. Specifically, the node_id is passed so that it can be used in downstream custom steps.

This is required for a downstream PR in kontrol (runtimeverification/kontrol#1131) that adds the node id to console log cheatcode logging, which is implemented by means of a custom step.

This PR will require adjustments in some downstream dependencies as well such as kevm. However, not all downstream dependencies make use of custom steps such as, e.g., wasm-semantics and komet.

@rv-jenkins rv-jenkins changed the base branch from master to develop April 8, 2026 10:01

@abstractmethod
def custom_step(self, c: CTerm, cs: CTermSymbolic) -> KCFGExtendResult | None: ...
def custom_step(self, c: CTerm, cs: CTermSymbolic, node_id: int) -> KCFGExtendResult | None: ...
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intended semantics of the node_id? Should it be optional?

Copy link
Copy Markdown
Contributor Author

@juliankuners juliankuners Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why it should be optional since node_id is always passed to it in extend_cterm. It is however optional for use by the custom step. Most custom steps will not make use of this. Only the _exec_console_log_custom_step custom step from runtimeverification/kontrol#1131 so far would make use of this.

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.

2 participants