Molly Pan

Results 11 issues of Molly Pan

- Add the bit-slice operator to enum. - Clarify when bit-slice can produce an l-value. Fixes #992

- We clarified that local stateful instantiations are evaluated in every instantiation of controls and parsers - We clarified that local variable declarations are evaluated in every invocation of controls...

- We added explicit equality and inequality comparisons for tuples, list expressions, and structure-valued expressions. - We explained the recursive implicit casts applied when using list and structure-valued expressions. (Do...

- We added a section to define _numeric types_, which is later referred to when defining the argument types of sets and indexes. - We clarified the implicit casts of...

In [8.18](https://p4.org/p4-spec/docs/P4-16-v1.2.2.html#sec-expr-hu), the spec illustrates with an example that assigning an invalid header to a union member is the same as setting the union member to invalid. ``` u.hi =...

According to the [spec](https://p4.org/p4-spec/docs/P4-16-v1.2.2.html#sec-instantiating-abstract-methods): “When instantiating an extern type that has abstract methods users have to supply implementations for all such methods. This is done using object initializers”, which include...

- We changed the definition of `setInvalid` for header union members. - We added the definition of `setInvalid` for header unions. Fixes #995

The spec talks about uninitialized values in [section 8.22](https://p4.org/p4-spec/docs/P4-16-v1.2.2.html#sec-uninitialized-values-and-writing-invalid-headers), but given the amount of information, this section is very hard to follow and easy to misinterpret. I think adding more...

The p4 spec does not specify the behavior of name duplication (reusing names in the same scope) and name shadowing (reusing names in the inner scope) in P4. Litmus Test...

The specification states that structure-valued expressions can be used in comparisons (== or !=) in section [8.12](https://p4.org/p4-spec/docs/P4-16-v1.2.2.html#sec-structure-expressions) ("Structure-valued expressions can be used... in comparisons..."), but it does not say so...

question