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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
dcall stands for deterministic call.
- 2.
Failures of when(C) and test(C) are treated differently in debugging mode owing to their semantic differences.
- 3.
{X,Y} represents a vector of two elements X and Y.
- 4.
About 1000Â MB memory was allocated for the generated code for tarai w/o cuts.
References
Kaplan, B.: Evaluating informatics applications - clinical decision support systems literature review. Int. J. Med. Inform. 64, 15–37 (2001)
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)
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)
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)
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)
Katayama, T.: A computation model based on attribute grammar. J. Inf. Process. Soc. Jpn. 24, 147–155 (1983)
Deransart, P., Jourdan, M. (eds.): Attribute Grammars and their Applications. LNCS, vol. 461. Springer, Heidelberg (1990)
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)
ISO/IEC: 13211–1 Information technology - Programming Languages - Prolog - Part 1: General core (1995)
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)
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)
Nagasawa, I.: Feature of design and intelligent CAD. J. Jpn. Soc. Precis. Eng. 54, 1429–1434 (1988)
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)
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)
Ait-Kaci, H.: Warren’s Abstract Machine. MIT Press, Cambridge (1991)
Demoen, B., Tarau, P.: jprolog home page. http://www.cs.kuleuven.ac.be/bmd/PrologInJava/ (1996)
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)
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)
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)
Neng-Fa, Z.: The language features and architecture of b-prolog. Theor. Pract. Logic Program. 11, 537–553 (2011)
Neng-Fa, Z.: Global optimizations in a prolog compiler for the TOAM. J. Logic Program. 15, 265–294 (1993)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)