Amzi! 4.1 Release

This file documents the changes introduced in the 4.1 Amzi! release. The **'d items may require source code changes.

New Features

Bug Fixes

Known Limitations

New Features

Java 1.1 Support

The Amzi! Java Interface has been rewritten to use the Java Development Kit (JDK) 1.1 Java Native Interface (JNI). The 1.1 JNI is a much improved, much cleaner API for integrating Java code with non-Java applications, but the change is internal and does not greatly affect the external specification of the Amzi! Java Logic Server class. The full source code for the interface, including both the Java source and the interface DLL source, is available in the amzi4\source\java11 directory.

(Note: Microsoft's Java does not, at this writing, support the 1.1 JNI, however, Java still supports the old-style Java native methods used in the Amzi! 1.0 Java interface. For this reason, and to continue support for JDK 1.0 applications, Amzi! will continue to distribute its 1.0 Java interface as well.)

There are some external improvements in the Amzi! Java Interface as well:

Extended Predicates for Visual Basic 5.0

The VB module now supports extended predicates so that Amzi! Prolog modules can call functions written in VB 5.0. The VB module now includes functions for definining and implementing extended predicates. A simple example is given in SAMPLES/VB/EXTPRED.

Multifile and Discontiguous Support

The ISO standard defines two directives that can be used to let the compiler know that the clauses of a predicate are discontiguous in the same file and/or that the clauses of a predicate might be defined in multiple files. The directives are discontiguous and multifile. As far as the Amzi! compiler is concerned, it does the same work for either directive, so the two may be used interchangably, and it is not necessary to use both for predicates whose clauses are both discontiguous and multifile. However, both directives are supported for compatibility with the ISO standard and other Prolog that support both.

For example, if the clauses of the predicate duck/1 are discontiguous within a file, then add the directive:

If you want to define the duck/1 predicate in other files, then each file should have the directive: This feature is especially useful for those situations where you might have multiple source files defining the same predicate for different situations. These can be separately compiled and the PLM files loaded on demand by the main application.

PLM Unload

A new predicate unload/1 has been added to remove all clauses from a previously loaded PLM file. The filename passed to unload/1 must be the same as the filename specified in load/1.

Removed Support for WinCGI

The CGI interface has been greatly simplified by removing support for the Windows CGI quasi-standard in favor of the widely support Standard CGI interface. Also, the Standard CGI variable names have been adopted. This means all Prolog scripts that reference those variables will need to be updated, or you can #define WINCGI_NAMES in AMZICGI.C to use the same Windows CGI variables names that were used previously.

Bug Fixes

Visual Basic Functions Return True/False and Types Have Changed

Functions that return the special VB value 'True' or 'False' are now declared as booleans instead of integers. If your code follows these conventions, no changes will be needed. If you use '1' and '0' instead, those values will need to be changed to 'True' and 'False'.

Some Visual Basic programs ran differently under the Developer Studio as compared with a stand-alone program. These problems were caused by some type mismatches between AMZI4.BAS and AMZI4.DLL. As a result, bINT and bSHORT are now defined the same; as 16-bit values. Functions that used to return integers now return longs, and arities are now bytes.