\[ \newcommand{\tr}{\Rightarrow} \newcommand{\trs}{\tr^{\!\ast}} \newcommand{\rlnm}[1]{\mathsf{(#1)}} \newcommand{\rred}[1]{\xrightarrow{#1}} \newcommand{\rreds}[1]{\mathrel{\xrightarrow{#1}\!\!^*}} \newcommand{\cl}{\mathsf{Cl}} \newcommand{\pow}{\mathcal{P}} \newcommand{\matches}{\mathrel{\mathsf{matches}}} \newcommand{\kw}[1]{\mathsf{#1}} \]

Tree constructor arity

The arity of a symbol is a natural number specifying how many arguments (inputs) it requires. This corresponds to the number of children required by a node labelled by this symbol in an abstract syntax tree.

  • A symbol with arity 0 is sometimes said to be nullary.
  • A symbol with arity 1 is sometimes said to be a unary operator.
  • A symbol with arity 2 is sometimes said to be a binary operator.

If a set of symbols is given alongside their arities, they are said to be ranked.