We need some preliminary concepts.
,
where A is the name of the agent and
t1,...,tn are first
order terms. The arity of A for terms must be n and
that for ports must be m . The distinguished edge is called
the principal port of A and the other edges
auxiliary ports. Definition 1
An additive interaction program is a triple <A, S, R> , where
.
In Figure
, and are agents. N is a net.
We call the left side of the arrow redex and the right side contractum.
All the names of the agents in R must belong to A and
all the terms of the agents in R must belong to
Ter(S) .
We say that two agents
A(s1,...,sh) and
B(t1,...,tk) in a net
without guarded unification variables are reducible
if the two agents are connected by their principal ports in the net.
Let r be a rewrite rule.
Reducible two agents
A(s1,...,sh) and
B(t1,...,tk) in a net
are unifiable with r
if the two agents in the redex of r have the form
A(u1,...,uh) and
B(v1,...,vk) and
the equation
E = {s1 =. u1,...,sh =. uh,t1 =. v1,...,tk =. vk}
has the most general unifier .
When reducible agents
A(s1,...,sh) and
B(t1,...,tk) in a net N
are unifiable with
the rewrite rule of the left side of Figure
by q ,
the rewrite rule can apply to the net N .
The right side of Figure
shows an application of the rule.
In Figure
,
q- N is the net that is obtained from N by replacing
every term w in N by
q- w , where
q- is defined by
q- =
[s1/X-1,...,sl/X-l,s1/X1,...,
sl/Xl]
when
q = [s1/X1,...,sl/Xl] .
In the rest of the paper, we simply call the situation a one-step reduction of two agents
A(s1,...,sh) and
B(t1,...,tk) in N .
From the definition of the one-step reduction, we can define a reduction relation on nets and
normal forms of nets as usual.