Interaction nets are a graphical
model of computation
In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes h ...
devised by
Yves Lafont in 1990 as a generalisation of the proof structures of
linear logic
Linear logic is a substructural logic proposed by Jean-Yves Girard as a refinement of classical and intuitionistic logic, joining the dualities of the former with many of the constructive properties of the latter. Although the logic has also ...
. An interaction net system is specified by a set of agent types and a set of interaction rules. Interaction nets are an inherently distributed model of computation in the sense that computations can take place simultaneously in many parts of an interaction net, and no synchronisation is needed. The latter is guaranteed by the strong confluence property of reduction in this model of computation. Thus interaction nets provide a natural language for massive parallelism. Interaction nets are at the heart of many implementations of the
lambda calculus
Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation t ...
, such as efficient closed reduction and optimal, in Lévy's sense, Lambdascope.
Definitions
Interactions nets are graph-like structures consisting of ''agents'' and ''edges''.
An agent of type
and with ''arity''
has one ''principal port'' and
''auxiliary ports''. Any port can be connected to at most one edge. Ports that are not connected to any edge are called ''free ports''. Free ports together form the ''interface'' of an interaction net. All agent types belong to a set
called ''signature''.
An interaction net that consists solely of edges is called a ''wiring'' and usually denoted as
. A ''tree''
with its ''root''
is inductively defined either as an edge
, or as an agent
with its free principal port
and its auxiliary ports
connected to the roots of other trees
.
Graphically, the primitive structures of interaction nets can be represented as follows:

When two agents are connected to each other with their principal ports, they form an ''active pair''. For
active pairs one can introduce ''interaction rules'' which describe how the active pair rewrites to another interaction
net. An interaction net with no active pairs is said to be in ''normal form''. A signature
(with
defined on it) along with a set of interaction rules defined for agents
together constitute an ''interaction system''.
Interaction calculus
Textual representation of interaction nets is called the ''interaction calculus'' and can be seen as a programming language.
Inductively defined trees correspond to ''terms''
in the interaction calculus, where
is called a ''name''.
Any interaction net
can be redrawn using the previously defined wiring and tree primitives as follows:

which in the interaction calculus corresponds to a ''configuration''
,
where
,
, and
are arbitrary terms. The ordered sequence
in the left-hand side is called an ''interface'', while the right-hand side contains an unordered multiset of ''equations''
. Wiring
translates to names, and each name has to occur exactly twice in a configuration.
Just like in the
-calculus, the interaction calculus has the notions of ''
-conversion'' and ''substitution'' naturally defined on configurations. Specifically, both occurrences of any name can be replaced with a
new name if the latter does not occur in a given configuration. Configurations are considered equivalent up to
-conversion. In turn, substitution