Lectures onType Theory
First-order interaction nets
appendix sectionrules

First-order interaction nets

Fix a finite signature Σ and ar:ΣN. An occurrence of αΣ has one principal port and ar(α) ordered auxiliary ports. A net is a finite set of agents and finite wiring components: an interval may attach at zero, one, or two agent ports and a circle is a closed wire. Each agent port is incident to at most one component; the ordered free interval ends form the interface. An active pair αβ is a wire between two principal ports.

An interaction rule replaces one active pair by a net with the same ordered boundary. The system supplies at most one rule for each unordered symbol pair. Reduction NIM replaces a matching active pair by a fresh copy of that right-hand side and reconnects corresponding boundary ports. Net equality in the metatheory is interface-fixing graph isomorphism NM, including consistent renaming of fresh internal data.

The chapter’s unary arithmetic instance has nullary Z, unary S, and binary A. Boundary names make its two rules A(y,r)ZIy=r, A(y,r)S(x)Ir=S(s) with A(y,s)x. Here an equation between boundary names means a wire splice.

For exactly-once lambda terms, the named syntactic translation T(t) uses binary agents Lam and App. Its beta interaction is App(T(u),r)Lam(x,T(t))Ix=T(u),r=T(t). It realizes T((λx.t)u)IT(t[u/x]) only for the exactly-once fragment. Duplication and erasure require additional agents.

For a finite constructor signature, a nullary eraser E and binary duplicator D may be given one rule against each constructor: Eα(x1,,xn)IEx1,,Exn, D(,r)α(x1,,xn)I=α(1,,n), r=α(r1,,rn),D(i,ri)xi(1in). These rules calculate only on finite constructor trees. Unary-normal-form readback is the external function rb(Z)=0 and rb(S(x))=1+rb(x). For a constructor template with k occurrences of its binder, the named translation Tres connects that binder to E for k=0, to a wire for k=1, and to a fixed full binary tree of k1 duplicators for k2. This is the finite constructor-tree fragment of theorem 41.17, not a general lambda translation.

The interaction-combinator signature has binary γ,δ and nullary ε. With intrinsic binary-port order 1,2, five of its six exact rules are εεIC,εγ(a1,a2)ICa1=ε, a2=ε,εδ(a1,a2)ICa1=ε, a2=ε,γ(a1,a2)γ(b1,b2)ICa1=b2, a2=b1,δ(a1,a2)δ(b1,b2)ICa1=b1, a2=b2. For the sixth, mixed rule, fresh pij give a1=δ(p11,p21),a2=δ(p12,p22),b1=γ(p11,p12),b2=γ(p21,p22). Each old boundary name occurs once on each side and every fresh wire name twice on the right. These equations are the six source diagrams in explicit ordered-port form.

The pinned HVM2 document names ten paper interactions: Link, Call, Void, Erase, Commute, Annihilate, Operate1, Operate2, Switch1, and Switch2. The pinned C/CUDA dispatcher uses eight classes: LINK, CALL, VOID, ERAS, COMM, ANNI, OPER, and SWIT. ERA/CON/DUP occupy the ε/γ/δ eraser/constructor/duplicator roles, but this role map does not prove identity of intrinsic auxiliary-port order. The remaining tags and global link state extend the abstract combinator signature. Its two independent ERAERA candidates dispatch to VOID; the chapter 41 microbenchmark leaves a numeric-zero root for readback after two interactions.

INAMB and the textual INMPP calculus

The binary-choice agent has two principal ports and two auxiliaries. In the right-hand-side convention of Fernández–Khalil Definition 4.2, its complete rules against any ordinary agent α are (,)amb(α(x),)α(x),(,)amb(α(x),)α(x). INMPP terms, multiequations, and configurations are t::=x(<p,,>p)α(u),q::=(1,,m)α(u)t=u,c::=tΔ. Every name occurs at most twice. Interface terms are INMPP-normal as in Definition 4.3: auxiliary subterms are normal and a principal variable of a term or subterm occurs at most once in the whole term.

Writing N(q) for the names in q, the two basic indirections are tx=u,q,ΔInd1tq[u/x],Δ(xN(q)),t(<p,x,>p)α(s),q,ΔInd2tq[(<p,,>p)α(s)/x],Δ. Indirection 3 selects one component of a multiequation: t(<p,(k<q,,k>q)β(u),>p)α(s),ΔInd3t(<p,,>p)α(s)=(k<q,,k>q)β(u),Δ. If the source rule at principal ports p,q has fresh right-side data (,k,s,u,eq), then Interaction is t(<p,,>p)α(s)=(k<q,,k>q)β(u),ΔInteractionts=s,u=u,{i=i}ip,{kj=kj}jq,eq,Δ. The fresh tuple is alpha-renamed before insertion. The two collection rules are tx=u,ΔCollect1t[u/x]Δ,t(<p,x,>p)α(s),ΔCollect2t[(<p,,>p)α(s)/x]Δ. The first requires xN(t), INMPP-normal u, and no principal variable of u in Δ; the second has the analogous normality and freshness conditions. Multiset congruence closes these rules under permutation of the equation multiset before and after a step.

With polarized port types σs, the structural rules are Xx:σs,x:σsAxΓ,t:σsΔ,u:σsΓ,Δ,t=u:Cut, {Γi,i:σisi}1imΓ,α(t):(σ1s1,,σmsm)Γ1,,Γm,Γ,(1,,m)α(t):MultiCut The selected form exposes one principal port: {Γi,i:σisi}ijΓ,α(t):(σ1s1,,σmsm){Γi}ij,Γ,(<j,,>j)α(t):σjsjSelect. Every agent contributes a Graft rule. In particular, Γ,t0:φs,t1:φsΓ,amb(t0,t1):(φs,φs)Graftamb.

Search the book

Type to search the local edition.