基于属性文法的不确定函数式语言的Java翻译
Translating Nondeterministic Functional Language based on Attribute Grammars into Java
摘要:
基于知识的系统适合于实现需要特定领域专家知识的高级功能,而知识表示语言及其支持环境对于实现这样的系统是必不可少的。虽然Prolog在实现这样的支持环境方面是有用和有效的,但是语言与其他实现语言(例如Java)的互操作性通常是实际应用开发中的重要问题。本文介绍了将一种基于属性文法的非确定性函数语言知识表示语言翻译成Java的技术。翻译是基于二进制化和技术提出的Prolog到Java的翻译,虽然语义是不同的Prolog。引入连续单元有效地处理连续问题,同时利用变量的单向赋值特性简化了回溯过程中的变量和寄存器管理。用该语言编写的实验翻译器成功地生成了Java代码,实验结果表明,对于非确定性程序,生成的代码比Prolog Cafe快25倍以上,对于确定性程序,生成的代码比Prolog Cafe快2倍以上。对于不确定性程序,生成的代码也比B-Prolog快2倍以上。
英文摘要:
Knowledge-based systems are suitable for realizing advanced functions that require domain-specific expert knowledge, while knowledge representation languages and their supporting environments are essential for realizing such systems. Although Prolog is useful and effective in realizing such a supporting environment, the language interoperability with other implementation languages, such as Java, is often an important issue in practical application development. This paper describes the techniques for translating a knowledge representation language that is a nondeterministic functional language based on attribute grammars into Java. The translation is based on binarization and the techniques proposed for Prolog to Java translation although the semantics are different from those of Prolog. A continuation unit is introduced to handle continuation efficiently, while the variable and register management on backtracking is simplified by using the single and unidirectional assignment features of variables. An experimental translator written in the language itself successfully generates Java code, while experimental results show that the generated code is over 25 times faster than that of Prolog Cafe for nondeterministic programs, and over 2 times faster for deterministic programs. The generated code is also over 2 times faster than B-Prolog for nondeterministic programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。