It is well recognized that type checking and in fe rence sys tems are very i mpor t a n t to develop correct programs if the p rogramming languages used are typeless such as Backus F'P, Lisp, Prolog and Smalltalk. In these languages it is s o m e t i m e hard to u n d e r s t a n d programs due to the lack of type informat ion , and we have to resort to costly r un t ime debugging ins tead of efficient compi le t ime error checking for finding program errors. To make the compi l e t ime error checking possible even for such type less languages, it is necessary to have means by which we can know the type i n f o r m a t i o n of the programs wi thout execut ing them. This is called a type in fe rence p rob lem and several works have been reported. Morris and Reynolds considered the p rob lem for a func t iona l language [9],[10] and gave a m e t h o d of finding the types. Milner ex tended their resul ts and proposed a type inference m e t h o d based on the unif icat ion algori thm of Robinson [7],[11]. Thei r approach is to assign a type express ion, which is made of type variables, to each func t ion appearing in the program and get equa t ions which hold a mong these variables. Solving these equat ions give the desired types. Several au thers cons idered the p rob lem for k-calculus based func t iona l languages [2],[6] ,[8] ,[13]. As for Backus FP language, F rank tried to build a sys tem for finding domain and range of func t ions defined by VP programs [3]. Gut tag, Horn ing and Wil l iams cons idered how to perform type checking of FP programs algebraically [4]. Suzuki cons ide red type in fe rence of Small talk [12].
[1]
Robin Milner,et al.
A Theory of Type Polymorphism in Programming
,
1978,
J. Comput. Syst. Sci..
[2]
Gordon D. Plotkin,et al.
An ideal model for recursive polymorphic types
,
1984,
Inf. Control..
[3]
Mitchell Wand,et al.
A types-as-sets semantics for milner-style polymorphism
,
1984,
POPL.
[4]
Robin Milner,et al.
Principal type-schemes for functional programs
,
1982,
POPL '82.
[5]
Norihisa Suzuki,et al.
Inferring types in Smalltalk
,
1981,
POPL '81.
[6]
Geoffrey A. Frank.
Specification of data structures for FP programs
,
1981,
FPCA '81.
[7]
James J. Horning,et al.
FP with data abstraction and strong typing
,
1981,
FPCA '81.
[8]
John C. Reynolds,et al.
Automatic computation of data set definitions
,
1968,
IFIP Congress.
[9]
John C. Mitchell,et al.
Coercion and type inference
,
1984,
POPL.
[10]
J. A. Robinson,et al.
A Machine-Oriented Logic Based on the Resolution Principle
,
1965,
JACM.
[11]
John W. Backus,et al.
Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs
,
1978,
CACM.
[12]
BackusJohn.
Can programming be liberated from the von Neumann style
,
1978
.