Skip to main content

A Most Specific Method Finding Algorithm for Reflection Based Dynamic Prolog-to-Java Interfaces

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1990))

Included in the following conference series:

Abstract

In the context of direct and reflection based extension mechanisms for the Jinni 2000 Java based Prolog system, we discuss the design and the implementation of a reflection based Prolog to Java interface. While the presence of dynamic type information on both the Prolog and the Java sides allows us to automate data conversion between method parameters, the presence of subtyping and method overloading makes finding the most specific method corresponding to a Prolog call pattern fairly difficult. We describe a run-time algorithm which closely mimics Java’s own compile-time method dispatching mechanism and provides accurate handling of overloaded methods beyond the reflection package’s limitations. As an application of our interfacing technique, a complete GUI library is built in Prolog using only 10 lines of application specific Java code.

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 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. P. Bothner. Kawa, the Java based Scheme system. Technical report, 1999. Available from http://www.delorie.com/gnu/docs/kawa/kawa toc.html.

  2. J. Gosling, B. Joy, and G. Steele. The Java Language Specification, Second Edition. Java Series. Addison-Wesley, 1999. ISBN:0-201-31008-2.

    Google Scholar 

  3. N. Kino. Plc. java: JIPL class source. Technical report, KLS Research Labs, 1997. Available from http://www.kprolog.com/jipl/index e.html.

  4. P. Tarau. A Logic Programming Based Software Architecture for Reactive Intelligent Mobile Agents. In P. Van Roy and P. Tarau, editors, Proceedings of DIPLCL’99, Las Cruces, NM, Nov. 1999. http://www.binnetcorp.com/wshops/ICLP99DistInetWshop.html.

  5. P. Tarau. Inference and Computation Mobility with Jinni. In K. Apt, V. Marek, and M. Truszczynski, editors, The Logic Programming Paradigm: a 25 Year Perspective, pages 33–48. Springer, 1999. ISBN 3-540-65463-1.

    Google Scholar 

  6. P. Tarau. Intelligent Mobile Agent Programming at the Intersection of Java and Prolog. In Proceedings of The Fourth International Conference on The Practical Application of Intelligent Agents and Multi-Agents, pages 109–123, London, U.K., 1999.

    Google Scholar 

  7. P. Tarau. Fluents: A Refactoring of Prolog for Uniform Reflection and Interoperation with External Objects. In J. Lloyd, editor, Proceedings of CL’2000, London, July 2000. to appear at Springer-Verlag.

    Google Scholar 

  8. P. Tarau, K. De Bosschere, and B. Demoen. Partial Translation: Towards a Portable and Efficient Prolog Implementation Technology. Journal of Logic Programming, 29(1–3):65–83, Nov. 1996.

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tyagi, S., Tarau, P. (2001). A Most Specific Method Finding Algorithm for Reflection Based Dynamic Prolog-to-Java Interfaces. In: Ramakrishnan, I.V. (eds) Practical Aspects of Declarative Languages. PADL 2001. Lecture Notes in Computer Science, vol 1990. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45241-9_22

Download citation

  • DOI: https://doi.org/10.1007/3-540-45241-9_22

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41768-2

  • Online ISBN: 978-3-540-45241-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics