Skip to content

[Exporter] Fix parameter direction and type emission in exportArgument#334

Open
p2peek wants to merge 1 commit intop4lang:fruffy/top4from
p2peek:clean-fix-parameter
Open

[Exporter] Fix parameter direction and type emission in exportArgument#334
p2peek wants to merge 1 commit intop4lang:fruffy/top4from
p2peek:clean-fix-parameter

Conversation

@p2peek
Copy link
Copy Markdown

@p2peek p2peek commented Mar 30, 2026

This PR fixes parameter emission in the P4HIR → P4 exporter.

Currently, exportArgument(...) only emits annotations and misses:

  • parameter direction (in/out/inout)
  • parameter type
  • parameter name

This change ensures that parameters are printed as valid P4 syntax, e.g.:

in bit<32> arg0

This is a minimal fix toward completing the exporter described in PR #168.

Next steps include:

  • extracting actual parameter direction from attributes
  • handling parameter names properly
  • improving type coverage

@fruffy
Copy link
Copy Markdown
Collaborator

fruffy commented Apr 6, 2026

Hi @p2peek can you set the base to the exporter branch so we can see the actual diff?

@p2peek p2peek changed the base branch from main to fruffy/top4 April 7, 2026 11:21
@p2peek p2peek force-pushed the clean-fix-parameter branch 4 times, most recently from 5680a45 to b71d4c7 Compare April 15, 2026 07:15
…ment

Signed-off-by: root <root@prakash.localdomain>
Signed-off-by: Prakash Kumar <kumarprakash3909@gmail.com>
@p2peek p2peek force-pushed the clean-fix-parameter branch from b71d4c7 to aa62978 Compare April 15, 2026 07:19
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