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

Maurizio Cimadamore, Mirko Viroli (2008). Integrating Java and Prolog through generic methods and type inference. NEW YORK : ACM.

Integrating Java and Prolog through generic methods and type inference

CIMADAMORE, MAURIZIO;VIROLI, MIRKO
2008

Abstract

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 object-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.
2008
Proceedings of the 23th ACM Symposium on Applied Computing (SAC 2008)
198
205
Maurizio Cimadamore, Mirko Viroli (2008). Integrating Java and Prolog through generic methods and type inference. NEW YORK : ACM.
Maurizio Cimadamore; Mirko Viroli
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/62738
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 4
  • ???jsp.display-item.citation.isi??? 1
social impact