摘要
Gdel是一种发展中的逻辑程序设计语言,目前还没有开发出编译器。Gdel语言的类型系统独特于通常的逻辑程序设计语言,语义上已初步形成了相应的描述方法,建立了严格的理论基础。按照传统的方法,逻辑程序的运行机制和Gdel语言的多态性决定了一些变量的类型和语义只能在运行时才能确定,把这类变量的类型检查放到程序运行中处理,势必增加许多额外的计算。提出了一种处理Gdel语言类型系统的编译技术。针对语言的类型,对其相关语法进行适当修改,通过类型推断,把变量类型的检查工作提前到编译阶段完成,可以较好地处理其变量类型的语义问题,同时减少了运行时类型检查工作,从而提高程序的运行效率。
Goedel is a developing logic programming language whose compiler has not been developed yet. The type system is one of the language's features. The language is polymorphic. It means that some variables' type can't be determined untill runtime. If a program does the type-checking for this variables while running, a lot of time would be taken. A method to dispose the variables' type in compiler is proposed. The method brings the work of that variables' type-checking into compile-time by using some type-inference rules, improving the running efficiency.
出处
《计算机科学与探索》
CSCD
2010年第3期256-264,共9页
Journal of Frontiers of Computer Science and Technology
基金
福建省自然科学基金No.A030007~~