This paper introduces a notion of partial type assignment on
left linear applicative term re\-writing systems that is based
on the extension defined by Mycroft of Curry's type assignment
system. The left linear applicative TRS we consider are
extensions to those suggested by most functional programming
languages in that they do not discriminate against the varieties
of function symbols that can be used in patterns. As such there
is no distinction between function symbols (such as {\sf append}
and {\sf plus}) and constructor symbols (such as {\sf cons} and
{\sf succ}).
Terms and rewrite rules will be written as trees, and type
assignment will consist of assigning types to function symbols,
nodes and edges between nodes. The only constraints on this
system are imposed by the relation between the type assigned
to a node and those assigned to its incoming and out-going edges.
We will show that every typeable term has a principal type, and
formulate a needed and sufficient condition typeable rewrite
rules should satisfy in order to gain preservance of types under
rewriting. As an example we will show that the optimisation
function performed after bracket abstraction is typeable.
Finally we will present a type check algorithm that checks if
rewrite rules are correctly typed, and finds the principal pair
for typeable terms.
Appeared as:
@Inproceedings {Bakel-Smetsers-Brock-CAAP'92,
Author = "S. van Bakel and S. Smetsers and S. Brock",
Title = "Partial {T}ype {A}ssignment in {L}eft {L}inear
{A}pplicative {T}erm {R}ewriting {S}ystems",
Booktitle = "Proceedings of CAAP '92. 17th Colloquim on Trees
in Algebra and Programming, {\rm Rennes, France}",
Editor = "J.-C. Raoult",
Series = "Lecture Notes in Computer Science",
Volume = "581",
Publisher = "Springer-Verlag",
Year = "1992",
Pages = "300-321"
}