Type system provides a precise description of a programming language. This is a prerequisite for the implementation and use of language. It also conducts mechanical and transparent type-checking on programs to preven...Type system provides a precise description of a programming language. This is a prerequisite for the implementation and use of language. It also conducts mechanical and transparent type-checking on programs to prevent the occurrence of execution error during the running of programs. So, it can be said that, on the one hand, type system works as a formal tool to do mathematical analysis of language; on the other hand, it is a formal method for rigorously and precisely designing and implementing language. In this paper, some basic concepts of type system are discussed first. And then, the implementation of a graph- rewriting- based functional language - SClean's type system is given in details. It is hoped that the proposed method of using and implementing type system is of practical usefulness.展开更多
基金the National Natural Science Foundation of China (No.69931040), and is also supported by Defense Science and Technology Fundi
文摘Type system provides a precise description of a programming language. This is a prerequisite for the implementation and use of language. It also conducts mechanical and transparent type-checking on programs to prevent the occurrence of execution error during the running of programs. So, it can be said that, on the one hand, type system works as a formal tool to do mathematical analysis of language; on the other hand, it is a formal method for rigorously and precisely designing and implementing language. In this paper, some basic concepts of type system are discussed first. And then, the implementation of a graph- rewriting- based functional language - SClean's type system is given in details. It is hoped that the proposed method of using and implementing type system is of practical usefulness.