JPC: A library for categorising and applying inter-language conversions between Java and Prolog

The number of approaches existing to enable a smooth interaction between Java and Prolog programs testifies the growing interest in solutions that combine the strengths of both languages. Most of these approaches provide limited support to allow programmers to customise how Prolog artefacts should be reified in the Java world, or how to reason about Java objects on the Prolog side. This is an error-prone task since often a considerable amount of mappings must be developed and organised. Furthermore, appropriate mappings may depend on the particular context in which a conversion is accomplished. Although some libraries alleviate this problem by providing higher-level abstractions to deal with the complexity of custom conversions between artefacts of the two languages, these libraries themselves are difficult to implement and evolve. We claim that this is caused by their lack of appropriate underlying building blocks for encapsulating, categorising and applying Java-Prolog conversion routines. We therefore introduce a new library, JPC, serving as a development tool for both programmers willing to categorise context-dependent conversion constructs in their Java-Prolog systems, and for architects implementing frameworks providing higher-level abstractions for better interoperability between these two languages.

[1]  François Fages,et al.  Modules for Prolog Revisited , 2006, ICLP.

[2]  Sergio Castro Mejia A portable approach for bidirectional integration between a logic and a statically-typed object-oriented programming language , 2014 .

[3]  水野 貴明,et al.  JavaScript : the good parts : 「良いパーツ」によるベストプラクティス , 2008 .

[4]  Kim Mens,et al.  Open Unification for Program Query Languages , 2007, XXVI International Conference of the Chilean Society of Computer Science (SCCC'07).

[5]  Andrea Omicini,et al.  Multi-paradigm Java-Prolog integration in tuProlog , 2005, Sci. Comput. Program..

[6]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[7]  Kim Mens,et al.  LogicObjects: Enabling Logic Programming in Java through Linguistic Symbiosis , 2013, PADL.

[8]  Paul Tarau,et al.  Agent Oriented Logic Programming Constructs in Jinni 2004 , 2004, ICLP.

[9]  Paulo Moura From Plain Prolog to Logtalk Objects: Effective Code Encapsulation and Reuse , 2009, ICLP.

[10]  P. Klint,et al.  Efficient annotated terms , 2000 .

[11]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[12]  Paul Klint,et al.  ATerms for manipulation and exchange of structured data: It's all about sharing , 2007, Inf. Softw. Technol..

[13]  Maydene Fisher,et al.  JDBC¿ API Tutorial and Reference , 2003 .

[14]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[15]  Manuel V. Hermenegildo,et al.  An overview of Ciao and its design philosophy , 2011, Theory and Practice of Logic Programming.

[16]  Ricardo Rocha,et al.  High Level Thread-Based Competitive Or-Parallelism in Logtalk , 2009, PADL.

[17]  Kim Mens,et al.  Diagnosing and correcting design inconsistencies in source code with logical abduction , 2011, Sci. Comput. Program..

[18]  V. S. Costa,et al.  The YAP Prolog system , 2011, Theory and Practice of Logic Programming.

[19]  Coen De Roover,et al.  Building development tools interactively using the EKEKO meta-programming library , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[20]  Tom Schrijvers,et al.  Under Consideration for Publication in Theory and Practice of Logic Programming Swi-prolog , 2022 .

[21]  Paulo Nunes,et al.  High-Level Multi-threading Programming in Logtalk , 2008, PADL.

[22]  Leon Sterling,et al.  The Art of Prolog , 1987, IEEE Expert.

[23]  Günter Kniesel,et al.  A comparison of logic-based infrastructures for concern detection and extraction , 2007, LATE@AOSD.

[24]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[25]  Miguel Calejo InterProlog: Towards a Declarative Embedding of Logic Programming in Java , 2004, JELIA.

[26]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[27]  Marie-Laure Mugnier,et al.  Proposal for a Monotonic Multiple Inheritance Linearization , 1994, OOPSLA.

[28]  Paulo Moura Programming Patterns for Logtalk Parametric Objects , 2009, INAP.

[29]  Robbie Vanbrabant Google Guice: Agile Lightweight Dependency Injection Framework (Firstpress) , 2008 .

[30]  Bart Demoen,et al.  Uniting the Prolog Community , 2008, ICLP.

[31]  Katsumi Inoue,et al.  Prolog Cafe : A Prolog to Java Translator System , 2005, INAP.

[32]  Hidehiko Masuhara,et al.  Modeling Crosscutting in Aspect-Oriented Mechanisms , 2003, ECOOP.

[33]  Dean Iverson,et al.  Pro JavaFX 2 , 2012, Apress.

[34]  Kim Mens,et al.  LogicObjects: a linguistic symbiosis approach to bring the declarative power of Prolog to Java , 2012, RAM-SE '12.

[35]  David Scott Warren,et al.  XSB: Extending Prolog with Tabled Logic Programming , 2010, Theory and Practice of Logic Programming.

[36]  Andy Kellens,et al.  The SOUL tool suite for querying programs in symbiosis with Eclipse , 2011, PPPJ.

[37]  Paul Tarau,et al.  Integrated symbol table, engine and heap memory management in multi-engine prolog , 2011, ISMM '11.

[38]  Kim Mens,et al.  Customisable Handling of Java References in Prolog Programs , 2014, ICLP 2014.

[39]  Jørgen Lindskov Knudsen Name Collision in Multiple Classification Hierarchies , 1988, ECOOP.

[40]  Martin Odersky,et al.  Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition , 2010 .