Java and Prolog: There is some (semi)secret connection

The paper briefly describes the basics of mathematical logic, logic programming, Prolog language and Prolog code from the book “The Java Virtual Machine Specification”.

ABSTRACT

Today, machine learning (which is most often defined as a subset of artificial intelligence) is “in”, especially deep learning (deep neural networks) as a subset of machine learning. But we should not reject “classical” artificial intelligence and the Prolog programming language (Prolog and Lisp are the most commonly used programming language for “classical” AI).

Prolog is based on mathematical logic, more specifically on the resolution method in first-order logic (although it also has second-order predicates).There are different libraries for Java and Prolog interoperability (a Java program calls a Prolog program or vice versa, a Java interpreter written in Prolog and vice versa …).But, it is less known that one important part of the Java Virtual Machine specification is defined through Prolog, i.e. there is Prolog code in the book “The Java Virtual Machine Specification”.

The paper briefly covers the basics of mathematical logic, logic programming, the Prolog language and Prolog code in “The JVM Specification”. There is also an example of a Prolog program that the author made some 30 years ago, which “knows” how to derive, e. g., the function y = pow(x, x) 🙂