Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.java > #1533

ANN: Jekejeke Prolog 1.0.9 (Java auto loading)

From j4n bur53 <janburse@fastmail.fm>
Newsgroups fr.comp.lang.java
Subject ANN: Jekejeke Prolog 1.0.9 (Java auto loading)
Date 2015-10-11 13:30 +0200
Organization albasani.net
Message-ID <mvdh91$ope$7@news.albasani.net> (permalink)

Show all headers | View raw


Dear All,

We have just uploaded the new release of
Jekejeke Prolog. We were mainly improving
the module system:

- Richer Foreign Function Interface:
Besides introducing a new data type of small
floats, denoted by the "0f" prefix, we have
also extended the foreign_XX/3 directives.
Its now possible to register Java methods and
Java fields as evaluable functions, and Java
constructors and Java fields as predicates.

- Prolog Text Auto Loading:
A qualified predicate or evaluable function call
will automatically load a module if it hasn't yet
been loaded. Currently modules names are first
looked up in libraries. This means the following
works now:

?- basic/lists:member(X, [1,2,3]).

If a module name is not found, an empty module whos
members are automatically public is created. This
means the following now works as well:

?- [user].
foo:bar.
?- foo:bar.

- Java class Auto Loading:
Additionally a module name is also looked up in
the Java class path. If a corresponding Java class
is found, this Java class is made available to the
Prolog system. Here is an example how the Java
class java.lang.Math is automatically loaded:

?- X is java/lang/'Math':'PI'.

And here is an example how the Java class
java.lang.System and java.io.PrintStream are
automatically loaded:

?- java/lang/'System':out(X), java/io/'PrintStream':println(X,'abc').

When a Java class is automatically loaded foreign_XX/3
directives are automatically placed. For overloaded
Java class members branching code is generated which
also respects specificity of argument types and
inheritance of Java class members from
the super class.

Happy coding!

Jan Burse, 11.10.2015
http://www.jekejeke.ch/

Back to fr.comp.lang.java | Previous | Next | Find similar | Unroll thread


Thread

ANN: Jekejeke Prolog 1.0.9 (Java auto loading) j4n bur53 <janburse@fastmail.fm> - 2015-10-11 13:30 +0200

csiph-web