Translating Nondeterministic Functional Language Based on Attribute Grammars into Java

  • Masanobu UmedaEmail author
  • Ryoto Naruse
  • Hiroaki Sone
  • Keiichi Katamine
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7773)


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 both useful and effective in this regard, the language interoperability with other implementation languages, such as Java, is often critical in practical application development. This paper describes the techniques for translating a knowledge representation language, a nondeterministic functional language based on attribute grammars, into Java. Translation is based on binarization and current techniques for Prolog to Java translation although the semantics are different from those of Prolog. A continuation unit is introduced to handle continuation efficiently, while variable and register management for backtracking is simplified by exploiting the single and unidirectional assignment features of variables. Experimental results for several benchmarks show that the code generated by the prototype translator is more than 25 times and 2 times faster than that of Prolog Cafe for nondeterministic programs and deterministic programs, respectively, and more than 2 times faster than B-Prolog for nondeterministic programs.


Knowledge representation language Language translation Prolog Java 


  1. 1.
    Kaplan, B.: Evaluating informatics applications - clinical decision support systems literature review. Int. J. Med. Inform. 64, 15–37 (2001)CrossRefGoogle Scholar
  2. 2.
    Takada, A., Nagase, K., Ohno, K., Umeda, M., Nagasawa, I.: Clinical decision support system, how do we realize it for hospital information system? Jpn. J. Med. Inform. 27, 315–320 (2007)Google Scholar
  3. 3.
    Nagasawa, H., Nagasawa, I., Takata, O., Umeda, M., Hashimoto, M., Takizawa, C.: Knowledge modeling for operation management support of a distribution center. In: The Sixth IEEE International Conference on Computer and Information Technology (CIT2006) (2006)Google Scholar
  4. 4.
    Nagasawa, I., Maeda, J., Tegoshi, Y., Makino, M.: A programming technique for some combination problems in a design support system using the method of generate-and-test. J. Struct. Constr. Eng. 417, 157–166 (1990)Google Scholar
  5. 5.
    Umeda, M., Nagasawa, I., Higuchi, T.: The elements of programming style in design calculations. In: Proceedings of the Ninth International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems, pp. 77–86 (1996)Google Scholar
  6. 6.
    Katayama, T.: A computation model based on attribute grammar. J. Inf. Process. Soc. Jpn. 24, 147–155 (1983)Google Scholar
  7. 7.
    Deransart, P., Jourdan, M. (eds.): Attribute Grammars and their Applications. LNCS, vol. 461. Springer, Heidelberg (1990)Google Scholar
  8. 8.
    Katamine, K., Umeda, M., Nagasawa, I., Hashimoto, M.: Integrated development environment for knowledge-based systems and its practical application. IEICE Trans. Inf. Syst. E87–D, 877–885 (2004)Google Scholar
  9. 9.
    ISO/IEC: 13211–1 Information technology - Programming Languages - Prolog - Part 1: General core (1995)Google Scholar
  10. 10.
    Umeda, M., Katamine, K., Nagasawa, I., Hashimoto, M., Takata, O., et al.: Multi-threading inside prolog for knowledge-based enterprise applications. In: Umeda, M., Wolf, A., Bartenstein, O., Geske, U., Seipel, D., Takata, O. (eds.) INAP 2005. LNCS (LNAI), vol. 4369, pp. 200–214. Springer, Heidelberg (2006)Google Scholar
  11. 11.
    Umeda, M., Katamine, K., Nagasawa, I., Hashimoto, M., Takata, O.: The design and implementation of knowledge processing server for enterprise information systems. Trans. Inf. Process. Soc. Jpn. 48, 1965–1979 (2007)Google Scholar
  12. 12.
    Nagasawa, I.: Feature of design and intelligent CAD. J. Jpn. Soc. Precis. Eng. 54, 1429–1434 (1988)CrossRefGoogle Scholar
  13. 13.
    Umeda, M., Mure, Y.: Knowledge management strategy and tactics for forging die design support. In: Seipel, D. (ed.) INAP 2009. LNCS, vol. 6547, pp. 188–204. Springer, Heidelberg (2011)Google Scholar
  14. 14.
    Hirota, T., Hashimoto, M., Nagasawa, I.: A discussion on conceptual model description language specific for an application domain. Trans. Inf. Process. Soc. Jpn. 36, 1151–1162 (1995)Google Scholar
  15. 15.
    Ait-Kaci, H.: Warren’s Abstract Machine. MIT Press, Cambridge (1991)Google Scholar
  16. 16.
    Demoen, B., Tarau, P.: jprolog home page. (1996)
  17. 17.
    Banbara, M., Tamura, N., Inoue, K.: Prolog Cafe: a prolog to Java translator system. In: Umeda, M., Wolf, A., Bartenstein, O., Geske, U., Seipel, D., Takata, O. (eds.) INAP 2005. LNCS (LNAI), vol. 4369, pp. 1–11. Springer, Heidelberg (2006)Google Scholar
  18. 18.
    Tarau, P., Boyer, M.: Elementary logic programs. In: Deransart, P., Maluszyński, J. (eds.) PLILP 1990. LNCS, vol. 456, pp. 159–173. Springer, Heidelberg (1990)Google Scholar
  19. 19.
    Cook, J.J.: Language interoperability and logic programming languages. In: Laboratory for Foundations of Computer Science, School of Informatics, University of Edinburgh, Doctor of philosophy (2004)Google Scholar
  20. 20.
    Neng-Fa, Z.: The language features and architecture of b-prolog. Theor. Pract. Logic Program. 11, 537–553 (2011)CrossRefGoogle Scholar
  21. 21.
    Neng-Fa, Z.: Global optimizations in a prolog compiler for the TOAM. J. Logic Program. 15, 265–294 (1993)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Masanobu Umeda
    • 1
    Email author
  • Ryoto Naruse
    • 2
  • Hiroaki Sone
    • 2
  • Keiichi Katamine
    • 1
  1. 1.Kyushu Institute of TechnologyIizukaJapan
  2. 2.NaU Data Institute Inc.IizukaJapan

Personalised recommendations