Skip to content

LDWG meeting minutes, January 7, 2019

Nate Foster edited this page Jan 7, 2019 · 1 revision

Reminder that we are keeping track of changes here: https://github.com/p4lang/p4-spec/wiki/Language-Design-Working-Group

Meta discussion

  • @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.

Empty tuples (#282)

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.

Semantics of cases in a switch statement (#692)

  • 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.

Deprecated annotation (#655)

  • This is a minor change that makes deprecated a predefined annotation.
  • Action Item: Mihai to fix conflict and merge

More Expressive Initializers (#717)

  • 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.

Freeform annotations (#695)

  • 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.

Default parameters for architectures (#383)

  • 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.

Structure Overlays (#656)

  • 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.

Sizeof Header (#712)

  • Current PR has sizeInBits(n) and sizeInBytes(n)
  • The varbit field of a header, if any, is ignored.

Namespaces and import (#628)

  • Mihai to work on simple mechanism, possibly based on Haskell/Python.

In-Language Descriptions of Architectures

  • Some preliminary throughts from Nate on how to model the semantics of architectures.
Clone this wiki locally