p4-spec
p4-spec copied to clipboard
Improve and move operations on sets for Issue 969
- 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 both set types and set operations.
- We added examples of implicit casts for set operations in implicit casts.
- We moved the section of Operations on sets before the section of Casts.
- We adapted an existing example to generate a set of
int<W>.
Fixes #969
Hi @MollyDream, this is the ONF bot 🤖 I'm glad you want to contribute to our projects! However, before accepting your contribution, we need to ask you to sign a Contributor License Agreement (CLA). You can do it online, it will take only a few minutes:
✒️ 👉 https://cla.opennetworking.org
After signing, make sure to add your Github user ID MollyDream to the agreement.
For more information or help:" https://wiki.opennetworking.org/x/BgCUI
When merging, the description of bit-slicing should be shortened by referring to the "numeric types".
As @QinshiWang suggests, maybe we want to rename the "numeric types" to "integral types".
This PR contains two parts, (1) adding the concept of numeric types and cleaning the spec, and (2) adding explanations of set<T>. If not much labor is needed to separate them, we should do so.
Subsumed by #1244.