Skip to main content

Translating Nondeterministic Functional Language Based on Attribute Grammars into Java

  • Conference paper
  • First Online:
Applications of Declarative Programming and Knowledge Management (INAP 2011, WLP 2011)

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    dcall stands for deterministic call.

  2. 2.

    Failures of when(C) and test(C) are treated differently in debugging mode owing to their semantic differences.

  3. 3.

    {X,Y} represents a vector of two elements X and Y.

  4. 4.

    About 1000 MB memory was allocated for the generated code for tarai w/o cuts.

References

  1. Kaplan, B.: Evaluating informatics applications - clinical decision support systems literature review. Int. J. Med. Inform. 64, 15–37 (2001)

    Article  Google Scholar 

  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. 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. 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. 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. Katayama, T.: A computation model based on attribute grammar. J. Inf. Process. Soc. Jpn. 24, 147–155 (1983)

    Google Scholar 

  7. Deransart, P., Jourdan, M. (eds.): Attribute Grammars and their Applications. LNCS, vol. 461. Springer, Heidelberg (1990)

    Google Scholar 

  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. ISO/IEC: 13211–1 Information technology - Programming Languages - Prolog - Part 1: General core (1995)

    Google Scholar 

  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. 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. Nagasawa, I.: Feature of design and intelligent CAD. J. Jpn. Soc. Precis. Eng. 54, 1429–1434 (1988)

    Article  Google Scholar 

  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. 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. Ait-Kaci, H.: Warren’s Abstract Machine. MIT Press, Cambridge (1991)

    Google Scholar 

  16. Demoen, B., Tarau, P.: jprolog home page. http://www.cs.kuleuven.ac.be/bmd/PrologInJava/ (1996)

  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. 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. 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. Neng-Fa, Z.: The language features and architecture of b-prolog. Theor. Pract. Logic Program. 11, 537–553 (2011)

    Article  Google Scholar 

  21. Neng-Fa, Z.: Global optimizations in a prolog compiler for the TOAM. J. Logic Program. 15, 265–294 (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Masanobu Umeda .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Umeda, M., Naruse, R., Sone, H., Katamine, K. (2013). Translating Nondeterministic Functional Language Based on Attribute Grammars into Java. In: Tompits, H., et al. Applications of Declarative Programming and Knowledge Management. INAP WLP 2011 2011. Lecture Notes in Computer Science(), vol 7773. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41524-1_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41524-1_3

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41523-4

  • Online ISBN: 978-3-642-41524-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics