p4-spec icon indicating copy to clipboard operation
p4-spec copied to clipboard

Issue #1001: Add constructor parameters to the list of compile-time known values

Open vgurevich opened this issue 4 years ago • 3 comments

Added constructor parameters to the list of the compile-time known values. This was an unfortunate omission in the spec.

vgurevich avatar Dec 19 '21 00:12 vgurevich

This is not absolutely true. Sometimes we want values that only dependents on the declaration but not instantiation. See my issue report for more information: https://github.com/p4lang/p4-spec/issues/932.

QinshiWang avatar Dec 19 '21 03:12 QinshiWang

Ahh, I'd forgotten about @QinshiWang's old writeup. Thanks for reminding me. Indeed, if we make this change, we would certainly not be able to do modular type checking. Perhaps there is a multi-pass, whole-program analysis that would be sound, but it'd be super complex and we've never written it down. I think there are good reasons to avoid it.

So we need to discuss this...

jnfoster avatar Dec 19 '21 03:12 jnfoster

We discussed this again at the April '22 meeting. @QinshiWang and @jnfoster will discuss and come back to the group with a proposal for going forward...

jnfoster avatar Apr 04 '22 21:04 jnfoster

This will be superseded by #1213

mihaibudiu avatar Mar 03 '23 00:03 mihaibudiu

The main question is whether we merge this until we finalize #1213

mihaibudiu avatar Mar 03 '23 00:03 mihaibudiu

In the interest of tidying up the set of active issues on the P4 specification repository, I'm marking this as "stalled" and closing it. Of course, we can always re-open it in the future if there is interest in resurrecting it.

jnfoster avatar Nov 11 '23 13:11 jnfoster