Integrating Java and Prolog through Generic Methods and Type Inference

Maurizio Cimadamore, Mirko Viroli

Roger L. Wainwright, Hisham M. Haddad, Ronaldo Menezes, Mirko Viroli (eds.)
23th ACM Symposium on Applied Computing (SAC 2008), pages 198-205
ACM, Fortaleza, Ceará, Brazil
16-20 March 2008

P@J is a framework, based on the tuProlog open-source engine, allowing Prolog code to be used as possible implementation of a Java method: Java annotations are used for specifying all the necessary information to fill the Java-Prolog gap. This framework is useful to inject a declarative, logic-based paradigm into mainstream ob ject-oriented programming, so as to easily code functionalities related to automatic reasoning, adaptivity, and conciseness in expressing algorithms.

In this paper, an extension of P@J is presented which improves the invocation technique for such Prolog-implemented methods. Java type inference of generic method calls is intensively used to automatically infer all the necessary paradigm mismatch information: this results in an elegant and concise invocation style, which further reduces the gap between Prolog goal satisfaction and Java method invocation. This new approach inspires some interesting applications: we show examples related to the implementation of abstract data types and parsers for context-free grammars.

(keywords) Generics, Java, Multiparadigm, Prolog, Wildcards

Publication
home

Publications / Views
tags  •  authors  •  editors  •  journals
2023  •  2022  •  2021  •  2020  •  2019  •  2018  •  2017  •  2016  •  2015  •  2014–1927
in journal  •  in proc  •  chapters  •  books  •  edited  •  spec issues  •  editorials  •  entries  •  manuals  •  tech reps  •  phd th  •  others
online  •  in press  •  proof  •  camera-ready  •  revised  •  accepted  •  revision  •  submitted  •  draft  •  note
ACM Digital Library  •  DBLP  •  IEEE Xplore  •  IRIS  •  PubMed  •  Google Scholar  •  Scopus  •  Semantic Scholar  •  Web of Science  •  DOI

Publication

— status

published

— sort

paper in proceedings

who

— authors

— editors

Roger L. Wainwright    Hisham M. Haddad    Ronaldo Menezes    Mirko Viroli

where & when

— publication date

16-20 March 2008

— volume

23th ACM Symposium on Applied Computing (SAC 2008)

— volume no.

1

— pages

198-205

BibTeX alignment

— address

Fortaleza, Ceará, Brazil

identifiers

ISBN & ISSN

— print ISBN

978-1-59593-753-7

notes

— note

Special Track on Programming Languages

Partita IVA: 01131710376 — Copyright © 2008–2023 APICe@DISI – PRIVACY