Font Size: a A A

The Design And Implementation For The Compiler Of Programming Language G(?)del

Posted on:2008-01-20Degree:MasterType:Thesis
Country:ChinaCandidate:J H SuFull Text:PDF
GTID:2178360242978916Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
G(o|¨)del is a declarative and general-purpose logic programming language succeeded to Prolog. It based on many-sorted first order logic with parametric polymorphism, discards the features of Prolog which are non-logical, introduces type system, integrates the merit of many languages, adds some new language components which let it be a powerful declarative programming language. As a tool, the implementation of the compiler for G(o|¨)del language will have great significance to in-depth study and widespread use of G(o|¨)del language,which is also important to the research of artificial intelligence and the development of intelligent software. At present, only has a compiler for G(o|¨)del language which is implemented with SICStus Prolog by the research team of Bristol University. But it only has implemented a subset of G(o|¨)del language.In this paper, one implementation of the compiler for language G(o|¨)del is introduced: we compiles source program to intermediate code which expresses the data object of source program according to the requirements of inference machine. Inference machine takes intermediate code as input which connects with inference machine produces goal code. The source program can be calculated by the execution of goal code, through which inference machine deals with the intermediate code. This is a method which is different from the technology route of implementation of Bristol G(o|¨)del. Based on such method, the overall structure of the compiler is given, the technique of lexical analysis, syntactic analysis, semantic analysis, intermediate code generation and error handling of compiling analysis system are introduced, a optimized algorithm of semantic analysis is discussed in more detail. Also, we take the type system as a separate sub-system of G(o|¨)del compiler system, and require it provide necessary data preparation during the period of dynamic execution, which is a novel technique in the implementation of compiler system of logic programming language.We have designed, developed a laboratory compiler of G(o|¨)del language which is efficient and compiles several typical instances, demonstrating basic idea, technology route we proposed are feasible. We believed that, with the compiler implementation technology is gradually mature, G(o|¨)del language will be able to receive more attention and obtain a more widespread use.
Keywords/Search Tags:G(o|¨)del Language, Compiler system, Polymorphic Many-sorted
PDF Full Text Request
Related items