Concept

Arity

Modified just now
Books JourneyProgramming Language Theory Statusmastered Tags
  • language-feature-design
  • semantics
  • set-theory-relation
  • syntax grammar

INFO

(Syntax & Grammar) According to Practical foundations for programming languages , a syntactic type signature of an Operator, determining the Sort of an operator and the number and the sorts of the arguments expected by the operator.

Example: In the context of Abstract syntax tree (AST)s, if an operator oo has an arity (s1,,sn)s(s_1, \dots, s_n)s for s,s1,,snSs, s_1, \dots, s_n \in \mathcal{S}, then o(a1,,an)o(a_1, \dots, a_n) is of sort ss if aia_i is of sort sis_i.

Example: In the context of Abstract binding tree (ABT)s, if an operator oo has an arity (v1,,vn)s(v_1, \dots, v_n)s, where sSs \in \mathcal{S} and viv_i is$s_1, \dots, s_k.s$, then o(x1.a1,,xn.an)o(\vec{x}_1.a_1, \dots, \vec{x}_n.a_n) is of sort ss if xi.ai\vec{x}_i.a_i has the corresponding Valence viv_i.