コンテンツにスキップ

Appendix A Revision History

  • Improved type nesting rules (Section[#sec-type-nesting]).
  • Clarified that directionless extern parameters are passed by reference.
  • Introduced distinction between local compile-time known and compile-time known values (Section[#sec-compile-time-known]).

  • Added header stack expressions (Section [#sec-hs-init]).

  • Allow casts from a type to itself (Section [#sec-casts]).
  • Added an invalid header or header union expression {#} (Sections [#sec-ops-on-hdrs] and [#sec-expr-hu]).
  • Added a concept of numeric values (Section [#sec-numeric-values]).
  • Added a section on operations on extern objects (Section [#sec-extern-operations]).
  • Added note in sections operations on types for types that support compile-time size determination.
  • Clarified that header stacks are arrays of headers or header unions.
  • Added distinctness of fields for types that have fields including error, match kind, struct, header, and header union.
  • Clarified types bit<W>, int<W>, and varbit<W> encompass the case where the width is a compile-time known expression evaluating to an appropriate integer (Section [#sec-unsigned-integers], Section [#sec-signed-integers], Section [#sec-dynamically-sized-integers]).
  • Clarified restrictions for parameters with default values (Section [#sec-calling-convention-justification]).
  • Added optional trailing commas (Section [#sec-trailing-commas]).
  • Clarified the scope of parser namespaces (Section [#sec-parser-decl]).
  • Specified that algorithm for generating control-plane names for keys is optional (Section [#sec-cp-keys]).
  • Clarified types of expressions that may appear in select (Section [#sec-select]).
  • Added description of semantics of the core.p4 match kinds (Section [#sec-table-keys]).
  • Explicitly disallow overloading of parsers, controls, and packages (Section [#sec-extern-objects]).
  • Clarified implicit casts present in select expressions (Section [#sec-select]).
  • Clarified that slices can be applied to arbitrary-precision integers (Section [#sec-varint-ops]).
  • Clarified that direct invocation is not possible for objects that have constructor arguments (Section [#sec-direct-invocation]).
  • Added comparison for tuples as a legal operation (Section [#sec-tuple-exprs]).
  • Clarified the behavior of lookahead on header-typed values (Section [#sec-packet-lookahead]).
  • Added static_assert function (Section [#sec-static-assert]).
  • Clarified semantics of ranges where the start is bigger than the end (Section [#sec-ranges]).
  • Allow ranges to be specified by serializable enums (Section [#sec-ranges]).
  • Specified type produced by the *sizeInB* methods (Section [#sec-minsizeinbits]).
  • Added section with operations on match_kind values (Section [#sec-match-kind-exprs]).
  • Renamed infinite-precision integers to arbitrary-precision integers (Section [#sec-arbitrary-precision-integers]).
  • compiler-inserted default_action is not const (Section [#sec-tables]).
  • Clarified the restrictions on run time for tables with const entries (Section [#sec-entries]).
  • renamed list expressions to tuple expressions
  • Added list type (Section [#sec-list-types]).
  • Defined entries table property without const, for entries installed when the P4 program is loaded, but the control plane can later change them or add to them (Section [#sec-entries]).
  • Clarified behavior of table with no key property, or if its list of keys is empty (Section [#sec-table-keys]).

  • Extended minSizeInBits and minSizeInBytes to apply to more expressions (Section [#sec-minsizeinbits]).

  • Added support for maxSizeInBits and maxSizeInBytes (Section [#sec-minsizeinbits]).
  • Added support for empty lists of const entries in tables (Section [#sec-entries]).
  • Added support for switch statements in actions (Section [#sec-actions]).
  • Added support for direct invocation of controls and parsers (Section [#sec-parameterization]).
  • Added parser value_set to list of control-plane visible names (Section [#sec-cp-names]).
  • Added match_kind as a base type (Section [#sec-match-kind-type]).
  • Removed structure initializers as they are subsumed by structure-valued expressions (Section [#sec-structure-expressions]).
  • Specified operations on values typed as type variables (Section [#sec-type-variable-operations]).
  • Clarified semantics of compile-time known values (Section [#sec-compile-time-known]).
  • Clarified semantics of directionless parameters (Section [#sec-calling-convention]).
  • Clarified semantics of arbitrary precision integers (Section [#sec-arbitrary-precision-integers]).
  • Clarified semantics of bit slices, shifts, and concatenation (Section [#sec-bit-ops]).
  • Clarified semantics of optional parameters (Section [#sec-optional-parameters]).
  • Clarified restrictions on extern method and function invocation (Section [#sec-calling-restrictions]).
  • Clarified semantics of implicit casts (Section [#sec-implicit-casts]).

  • Added support for accessing tuple fields (Section [#sec-tuple-exprs]).

  • Added support for generic structures (Section [#sec-type-spec]).
  • Added support for integers, enums, and errors in switch statements (Section [#sec-switch-stmt]).
  • Added support for additional enumeration types (Section [#sec-enum-types]).
  • Added support for abstract methods (Section [#sec-abstract-methods]).
  • Added support for conditional statements and empty statements in parsers (Section [#sec-parser-state-stmt]).
  • Added support for casts from int to bool (Section [#sec-casts]).
  • Added support for 0-width bitstrings and varbits (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
  • Clarified that default_action is NoAction if otherwise unspecified (Section [#sec-tables]).
  • Clarified the types of expressions that may be used as indexes for header stacks (Section [#sec-expr-hs]).
  • Clarified representation of Booleans in headers (Section [#sec-header-types]).
  • Clarified representation of empty types (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
  • Clarified that action data can be specified by the control plane, default_action table property, or const entries table property (Section [#sec-actions]).
  • Fixed several typos and inconsistencies in grammar (Section [#sec-grammar]).
  • Eliminated annotations on const entries in grammar (Section [#sec-grammar]).

  • Added structure-value expressions (Section [#sec-structure-expressions]).

  • Added support for default values (Section [#sec-default-values]).
  • Added support for concatenating signed strings (Section [#sec-concatenation]).
  • Added key-value and list-structured annotations (Section [#sec-annotations]).
  • Added @pure and @noSideEffects annotations (Section [#sec-extern-annotations]).
  • Added @noWarn annotation (Section [#sec-nowarn-anno]).
  • Generalized typing for masks to allow serializable enums (Section [#sec-cubes]).
  • Restricted the right operands of bit shifts involving arbitrary-precision integers to be constant and positive (Section [#sec-varint-ops]).
  • Clarified copy-out behavior for return (Section [#sec-return-stmt]) and exit (Section [#sec-exit-stmt]) statements.
  • Clarified semantics of invalid header stacks (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
  • Clarified initialization semantics (Section [#sec-lvalues] and [#sec-calling-convention]), especially for headers and local variables.
  • Clarified evaluation order for table keys (Section [#sec-mau-semantics]).
  • Fixed grammar to clarify parsing of right shift operator (>>), allow empty statements in parser (Section [#sec-parser-state-stmt]), and eliminate annotations on const entries (Section [#sec-entries]).

  • Added table.apply().miss (Section [#sec-invoke-mau]).

  • Added string type (Section [#sec-string-type]).
  • Added implicit casts from enum values (Section [#sec-enum-exprs]).
  • Allow 1-bit signed values
  • Define the type of bit slices from signed and unsigned values to be unsigned.
  • Constrain default label position for switch statements.
  • Allow empty tuples.
  • Added @deprecated annotation.
  • Relaxed the structure of annotation bodies.
  • Removed the @pkginfo annotation, which is now defined by the P4Runtime specification.
  • Added int type (Section [#sec-arbitrary-precision-integers]).
  • Added error ParserInvalidArgument (Sections [#sec-packet-extract-two], [#sec-skip-bits]).
  • Clarified the significance of order of entries in const entries (Section [#sec-entries]).
  • Added methods to calculate header size (Section [#sec-ops-on-hdrs]).

  • Top-level functions (Section [#sec-functions])

    • Functions may be declared at the top-level of a P4 program.
  • Optional and named parameters (Section [#sec-calling-convention])
    • Parameters may be specified by name, with a default value, or designated as optional.
  • enum representations (Section [#sec-enum-exprs])
    • enum values to be specified with a concrete representation.
  • Parser values sets (Section [#sec-value-set])
    • value_set objects for control-plane programmable select labels.
  • Type definitions (Section [#sec-newtype])
    • New types may be introduced in programs.
  • Saturating arithmetic (Section [#sec-bit-ops])
    • Saturating arithmetic is supported on some targets.
  • Structured annotations (Section [#sec-annotations])
    • Annotations may be specified as lists of key-value pairs
  • Globalname (Section [#sec-name-annotations])
    • The reserved globalname annotation has been removed.
  • Table size property (Section [#sec-size-table-property])
    • Meaning of optional size property for tables has been defined.
  • Invalid headers (Section [#sec-ops-on-hdrs])
    • Clarified semantics of operations on invalid headers.
  • Calling restrictions (Section [#sec-calling-restrictions])
    • Added restrictions on kinds of values that may be passed as arguments to calls.
  • Bitwise operator precedence (Section [#sec-grammar])
    • Modified precedence conventions so that bitwise operators & | and ^ have higher precedence than relation operators < > <= >=.
  • Computed bitwidths (Section [#sec-base-types])
    • Added support for specifying widths using expressions in bit and varbit types.