Application Provider Interface for Interaction Between Java and Prolog Programming Languages
Jose Eduardo Zalacain Llanes
Issue:
Volume 7, Issue 5, September 2022
Pages:
81-101
Received:
23 June 2022
Accepted:
2 August 2022
Published:
28 September 2022
DOI:
10.11648/j.mcs.20220705.11
Downloads:
Views:
Abstract: There are many initiatives in presents-days for interaction between Java and Prolog programming languages. These initiatives allow combine two programming paradigms, Object Oriented Programming and Logic Programming. Every proposed interface has specifics features depending of the final use. The present paper introduces a new Java Prolog Interface (JPI) to be used for Prolog persistence interacting from Java side and functional programming from Prolog side. JPI define a layered architecture where each component represents a library to connect the final user application with some specific Prolog Engine. The project equals to existing solutions have an implementation for the most popular open source Prolog Engines like SWI, YAP, TuProlog, JLog and JTrolog. To support Java and Prolog interaction an inter-languages data type mappings between Java objects and Prolog terms is implemented. This API have a logic development workflow to create Terms, Engines, Query and some builder classes to help Clauses and Query creation. JPI implement the javax.script interface include in Java from version 1.6. Using a Java Prolog Benchmark test and evaluate different Prolog Engines implementations to determine the performance over JPI. The best performance is obtained using pure Java Prolog Engines respect to Native Engines. JPI is a modern solution that take the best features from existing solutions and combine all in one. It’s more flexible, adaptive and have an Application Provider Interface (API) easy to use. Provides clear and concise access to Prolog and simplifies the integration of predicates in Prolog and provides an automated object-to-term mapping mechanism.
Abstract: There are many initiatives in presents-days for interaction between Java and Prolog programming languages. These initiatives allow combine two programming paradigms, Object Oriented Programming and Logic Programming. Every proposed interface has specifics features depending of the final use. The present paper introduces a new Java Prolog Interface ...
Show More
Construction for a Class of Borderenergetic Digraphs
Xumei Jin,
Bo Deng,
Hongyu Zhang
Issue:
Volume 7, Issue 5, September 2022
Pages:
102-105
Received:
10 October 2022
Accepted:
28 October 2022
Published:
4 November 2022
DOI:
10.11648/j.mcs.20220705.12
Downloads:
Views:
Abstract: The energy of a digraph is defined as the sum of all real parts of its eigenvalues which are respect to its adjacency matrix. It is well known that graph energy is found that there are many applications in chemistry, physics and biology. In 2015, Gong and Gutman et al. proposed the concept of a borderenergetic graph. That is, if a graph G of order n satisfies its graph energy is equal to the value obtained by using twice of its order minus two, then G is called a borderenergetic graph. That is, the energies of borderenergetic graphs are equal to those of complete graphs of the same orders. Note that a graph is also a special digraph. Naturally, the concept of a borderenergetic digraph is extended to digraph energy. In this work, we first characterize its matrix and obtain the relationship between the spectra of a digraph and its complement. By using the spectra of the complete product between two regular digraphs, a kind of borderenergetic digraphs can be constructed. Furthermore, based on the results before, a class of sequences of borderenergetic digraphs can be constructed.
Abstract: The energy of a digraph is defined as the sum of all real parts of its eigenvalues which are respect to its adjacency matrix. It is well known that graph energy is found that there are many applications in chemistry, physics and biology. In 2015, Gong and Gutman et al. proposed the concept of a borderenergetic graph. That is, if a graph G of order ...
Show More