Skip to content
Programming Language Theory Concept

Arity

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 o has an arity (s1,…,sn)s for s,s1,…,sn∈𝒮, then o(a1,…,an) is of sort s if ai is of sort si.

Example: In the context of Abstract binding tree (ABT)s, if an operator o has an arity (v1,…,vn)s, where s∈𝒮 and vi iss1,…,sk.s, then o(x→1.a1,…,x→n.an) is of sort s if x→i.ai has the corresponding Valence vi.