Amzi! News, Winter '96

Contents

If you would like a printed copy of this newsletter that includes screen shots, please e-mail us on www.amzi.com with your name and mailing address. Amzi! customers will receive this newsletter automatically in early February.

New Amzi! Release Adds ODBC Support, Delphi Tools and More...

Aside from the normal assortment of maintenance work, the 3.3 Jan96 release has five new features.

LSXs

The LSX facility allows you to package extended predicates in DLLs, so they can be used by any Prolog program, including the IDE. This means your extended predicates can be tested from the Prolog listener in the IDE, as well as used by any of your applications.

ODBC Support

ODBC support is provided as a beta feature. It currently supports queries, both through low-level calls to ODBC functions, and through a higher-level mapping that makes database queries behave like Prolog queries backtracking. ODBC support is implemented as an LSX, allowing direct database access to databases from the IDE. (See separate article for more details.)

Delphi GUI Toolbox

The Delphi GUI toolbox is a collection of extended predicates that allow Prolog to directly manipulate graphic elements in the Delphi environment. For example, there are predicates that draw in paint boxes, and change the attributes of controls. (See articles inside for details.)

Huge16-bit Heap

For 16-bit applications, the available heap space has been greatly expanded (using the huge model). Now, heap and local stacks are virtually unlimited in size.

On-Line Documentation

The last feature is the expanded help files. These now contain the full Amzi! documentation and will, from this release on, be the primary documentation. The printed manuals will still be included with the product, but they will be derived from the help files, rather than the other way around.

Using Visual Basic 4.0 or Delphi 2.0?

Support for these new products is included in 3.3 Jan96! 

Access Data Transparently with ODBC

Two-Level Interface

The beta ODBC LSX provides two levels of support for database queries.

One is direct access to ODBC functions for building and executing SQL queries, with mapping of Prolog terms to and from the database fields.

The other is a higher-level interface that allows Prolog-like queries of databases. That is, the query can be backtracked into, returning all database records that match the query.

Source Included

The ODBC LSX comes with complete source code in two parts. One is the `C' code used to implement the extended predicates that connect Prolog to ODBC. The other is the Prolog code that provides a smooth wrapper around those extended predicates.

Demo Available

A demo of the ODBC LSX comes with the Jan96 release and is also available from our Web site (http://www.amzi.com). It is the classic family tree application, only in this case the data about individuals is stored in an Access database, while the rules describing relationships are all written as usual in Prolog.

For example, the following rule creates a Prolog predicate that queries the `person' database table, looking for just the values of the person id (pid) and mother fields.

mother(M, C) :-
db_query(person,
[pid=C, mother=M]).

db_query/2 works as you would expect Prolog to work, so if M is bound and C is not, backtracking will produce all of the children of the mother.

The demo version has a C++ front-end, but the application can be run from the IDE as well because the ODBC support is implemented as an LSX. 

Delphi GUI Toolbox

The Delphi GUI Toolbox enables an interesting mix of Delphi and Prolog code for graphics applications. Delphi provides great tools for building GUIs, and Prolog is great at driving the graphics display.

A demo application that illustrates this interaction for graphical layout is available on the distribution disks or on our Web site (http://www.amzi. com). The demo includes an EXE file so it does not require Delphi to run.

The demo application takes a programmatic mathematical expression such as:

c=sqrt(a**2 + b**2)

and displays it as it might appear in a textbook, that is, with fractions drawn above and below a horizontal line, exponents written above, and square root radicals surrounding full expressions.

The demo has a simple user interface. An edit box is provided, in which a mathematical expression is entered in normal Prolog syntax. A paint box is displayed below in which the expression is laid out in textbook format.

The Prolog code that does the layout is a relatively compact recursive predicate. It simply walks the Prolog structure that represents the expression, deciding on the correct position and size for each element based on the surrounding elements.

Prolog pattern matching makes it easy to express the physical layout relationships between the elements of the expression, and generate the correct drawing predicates using the Delphi GUI toolbox.

The demo includes the source code for the toolbox predicates as well as the Delphi front-end and Prolog layout code.

  

Pacific AI Provides Intelligent Testing

Pacific AI implements intelligent training and testing tools. Their latest project is an on-line assessment testing tool that can be used for either assessing a student's performance, or creating a self-study guide that is driven by student responses to test questions. In either case, the flow of the test is driven by student answers.

The user interface for the tests is implemented using Borland's Delphi. Prolog is used for the scripting language thatdefines the test questions, as well as the intelligent flow of the test, generating assessment reports, and physically laying out the Delphi controls that will be presented for any given question.

The implementation of the scripting language for intelligent tests capitalizes on Prolog's strengths for language parsing. The direct manipulation of Delphi controls by Prolog relies on the ease with which Amzi! Prolog can be extended to access anything callable from Delphi (or C/C++).

For example, Prolog code takes symbolic representations of equations and presents them both textually formatted as they might appear in a text book (fractions above and below, square root radicals fully drawn, exponents raised, etc.) and graphically using Scigraph's Delphi graphing component ( http://www.ee. princeton.edu/~phmertz/scigraph/scigraph.html).

In the first case, Prolog is an excellent tool for expressing the rules for formatting an equation, which are translated directly into drawing commands, and in the second, Prolog is excellent at converting a symbolic representation of an equation into points for graphing which are passed to the Scigraph component.

For self-study, the Prolog code can directly access Windows help files. Based on student answers, the scripting language for the tests can direct the student to help topics that explain the areas the student is having difficulty with.

  

Linux Beta Test Now Available

We have ported the command-line version of Amzi! Prolog + Logic Server to Linux on the PC.

For a limited time, we are offering the Personal Edition in beta test for $49 plus shipping. (The normal price is $98 for the Personal Edition and $298 for the Professional Edition.)

The Linux Edition has all the features of the 32-bit DOS version. The Amzi! tools are accessed via a scrolling command-line interface, and the Logic Server is provided in library format for linking with various languages under Linux. 

What Happened to Adventure in Prolog?

We have just learned that Springer-Verlag has run out of copies of Adventure in Prolog.

Shortly we expect to obtain the publishing rights back for the book, at which time Amzi! will publish a new edition.

This will feature examples using Amzi! Prolog code and we hope to incorporate some of our new samples (interfacing with C/C++, VB and Delphi).

If you would like to continue to use Adventure in Prolog for a course, please let us know your requirements as soon as possible. 

Upgrade Information

Subscribers

Subscribers will automatically receive the Jan96 release, including new documentation (in 7"x9" format). If you don't receive it, please contact us.

Upgrades

If you'd like the Jan96 release please fill out the form below. You get a (large) credit against the full purchase price for whatever product/edition you currently own. Recent purchasers can get the upgrade for the cost of shipping. For multiple copy or site license upgrades, please contact us.

Order/Upgrade Form

Offer Expires March 15th
Name:

Organization:

Full Address:




Phone/Fax:

E-Mail:

Payment Method:  __Check    __MasterCard    __Visa    __AmEx

Card #:  __________________________________    Exp: __________

Signature:  __________________________________________________

If you did not purchase directly from Amzi! and have not 
registered, please enclose your filled-out registration cards.  If 
you purchased after Dec 1, 1995 (and not from us), please enclose 
a copy of your dated sales receipt.

   To order call us:     508 897 7332
   Or, fax form to:      508 897 2784
   Or, mail form to:     address at TOP

[1]  SELECT PRODUCT--Which of the following editions      
     would you like to purchase or upgrade to?
     Professional   16-bit Prof.     Personal     Student     Linux
     __ $598        __$298           __$298       __$79       __$49

     Check your choice and enter the price here             _______

[2]  CREDIT FOR PRIOR PURCHASE--Select the amount of 
     the credit below based on your current copy.
     Purchases after Dec 1,1995:
          Professional Edition                  $598
          16-bit Prof. or Personal Editions     $298
     Version 3.3 Users:
          Professional Edition                  $533
          16-bit Prof. or Personal Editions     $233
     Version 3.0 Users:
          Cogent for NT                         $433
          Cogent for Windows/DOS                $133

     Enter the applicable credit (if any) here:              _______     

[3]  Subtract [2] from [1] and enter result here (>= 0)      _______

[4]  ORDER ADDITIONAL PRODUCTS--Select here:
     __Subscription Plus                       $150          _______
     __Expert Systems in Prolog, book/disk     $94           _______
     __Active Prolog Tutor, Personal Ed.       $75           _______
     __Programming in Prolog, book             $34           _______

[5]  SUBTOTAL--Add [3] and [4] and enter result here:        _______

[6]  SALES TAX--Mass. residents add 5% sales tax:            _______

[7]  SHIPPING--$10 North America; $20 Otherwise              _______

[8]  TOTAL--Add [5], [6] and [7] (payable in US$ please)     _______

Need More Information?

Call, Write or E-Mail for a free copy of our latest catalog 

Xircom Provides Configuration Advice with C++ and Amzi!

Xircom Inc. is now using an installation program for its PC card networking products that advises the users on possible configurations based on the user's portable computer environment. First, the software examines the various resources of the portable required by the PC card adapter (I/O ports, IRQs, COM ports, memory) for installation and configuration. Then a Prolog expert system makes recommendations on an optimum system set-up that will enable a smooth installation of Xircom's modems and network adapters.

The application is written in Borland's C++ and works in Windows 3.1x and DOS environments. In each environment, the main installation program performs a comprehensive analysis of system components, creates a file of Prolog assertions, and a database of the results. The resultant database specifies resources that are available, unavailable, under system control, nonexistent, etc. Then the Amzi! Prolog Logic Server is invoked. The rule-based expert examines the database for conflicting or incorrectly-configured resources and also examines the resources where the network or modem adapter can be configured. Finally, using the exhaustive search logic inherent in Prolog, all combinations of potential resource allocations are tried. Those combinations that cannot be verified as workable are eliminated.

Resulting correct configurations are then presented to the user through the C++ front-end, where the user can accept a default, or select from the choices that the expert system has verified as workable. If is impossible to define a working combination of resources, this is reported via the user interface along with a log file which contains valuable assistance for correcting the problem.

The Prolog component encodes the configuration rules directly in Prolog. It contains about 200 rules that analyze the user's environment and invoke low-level code that verifies selected configuration combinations.

 

Amzi! inc.
40 Samuel Prescott Drive
Stow, MA 01775 U.S.A.
tel 508 897 7332
fax 508 897 2784
http://www.amzi.com
ftp.amzi.com /pub/users/amzi