Jekejeke Prolog 1.0.9 (Java auto loading)

Jan Burse, created Oct 10. 2015 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 the 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 fiels as evaluable functions, and Java constructors and Java fiels 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 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! Android Appstores: Google Play Download: Runtime Library


Re: Jekejeke Prolog 1.0.9 (Java auto loading)

Jan Burse, created Oct 18. 2015 Dear All, I have just uploaded a hotfix release 1.0.9b. There was a glitch in the float comparison, noticed by Stanislav Maslovski. Here is a failed test case: ?- 1.0 =< 0.1. Expected result: No Actual result in release 1.0.9: Yes Best Regards