-
Notifications
You must be signed in to change notification settings - Fork 80
LDWG meeting minutes, January 7, 2019
Reminder that we are keeping track of changes here: https://github.com/p4lang/p4-spec/wiki/Language-Design-Working-Group
- @mbudiu-vmw to create a changelog in the spec.
- @jnfoster to send a note about logistics.
- Do folks want to move the meeting time? We'll see if we can find a way to gather input form folks in inconvenient timezones without changing the LDWG meeting time.
This proposal adds a type for empty tuples.
- A PR (#1617) has already been merged into p4c.
- Action Item: merge PR (#705) into the spec.
- p4c now adds a warning if
default
is not the final label in the list of cases. - Actually want to specify the semantics of (arguably non-sensical) case lists.
-
Action Item: Mihai to:
- Add text to say that
default
matches only if no other concrete label matches. - Add text to specify that duplicate labels are forbidden.
- Add text to say that
- This is a minor change that makes
deprecated
a predefined annotation. - Action Item: Mihai to fix conflict and merge
-
Allows structs and headers to be initialized with field-expression pairs.
-
The initializer must specify a value for all fields of a struct (with no duplicates).
-
Action Item:
- Interested parties should read the PR and comment.
- Mihai to check that the grammar is not ambiguous.
-
Aside: names of field lists are being lost in P4-14 to P4-16 converstion. @hanw to provide an example as a comment on the GitHub issue for further discussion
-
@jafingerhut: what happens if there are two different structs with the same fields? Then the same RHS might have two different types depending on context.
-
Nate: can we do anything with headers containing varbits? Mihai: no.
-
Nate: does it make sense to go through all of our types and ask whether/how we initialize them? Header unions, stacks, etc.
- Andy: does the "body" of the annotation need to be legal P4 tokens?
- Mihai: is there any escaping?
- Jed: No.
- Mihai: What about comments?
- Jed: I think those get removed from the code.
-
Want to allow programmers to use default parameters specified by the architecture for controls.
-
But only works for
in
parameters... -
Andy: workaround is to provide skeleton code.
-
Nate: seems like what we want first-class support for architectures, including the ability to define derived architectures.
-
Action Item: @hanw to provide a "painful" example and the same example written in a more beautiful way, and we'll discuss at a future meeting.
- Idea is to compute views of low-level representations.
- To use an an lvalue, need to ensure injectivity. (Could also try to define the order of evaluation to make things deterministic but that seems less elegant.)
- What about header unions, stacks, varbits? Not yet.
- Current PR has
sizeInBits(n)
andsizeInBytes(n)
- The
varbit
field of a header, if any, is ignored.
- Mihai to work on simple mechanism, possibly based on Haskell/Python.
- Some preliminary throughts from Nate on how to model the semantics of architectures.