Section "java"

The specifics mainly deal with the number blending that is applied in the Dogelog Player for the Java platform. Whereas Prolog atoms are simply mapped to Javat String class, the mapping of Prolog integers is towards the Java Integer class and the Java BigInteger class. Whereas the Prolog floats simply map to the Java Double class.

The following mapping from Prolog to Java is used:

Prolog Atomic
+--- Prolog Atom
+--- Java String
+--- Prolog Number
+--- Prolog integer
+---- Java Integer
+---- Java BigInteger
+--- Prolog float
+---- Java Double
+--- Prolog 0rInf Special
+---- Java Double.POSITIVE_INFINITY
+--- Prolog -0rInf Special
+---- Java Double.NEGATIVE_INFINITY
+--- Prolog 0rNaN Special
+---- Java Double.NaN
+--- Prolog 0rNone Reference
+--- Java null
+--- Prolog 0rFalse Reference
+--- Java Boolean.FALSE
+--- Prolog 0rTrue Reference
+--- Java Boolean.TRUE

The following Java specific calls are provided:

is_bigint(T): host language
Check whether the object T is a Java BigInteger.
norm_smallint(T): host language
Return the Java long T normalized to a Prolog integer.
norm_bigint(T): host language
Return the Java BigInteger T normalized to a Prolog integer.
widen_bigint(T): host language
Return the Prolog integer T widened to a Java BigInteger.

Use Privacy (c) 2005-2026 XLOG Technologies AG