Home Open Source Articles Videos Support Contact

Sign-up for the
Amzi! Newsletter


Amzi! Open Source Projects

Source at GitHub/AmziLS

Binaries Here

Details on Projects

Support For You

Support for Us

Amzi! Prolog + Logic Server

There are fun, relatively easy enhancements that can be made to the system. Amzi! uses a virtual machine architecture that is designed to be easily ported, and easily extended. The engine is a C++ program that has run in literally a dozen computing environments. The engine has a full C API that lets any external tools with a C interface connect to Amzi! and also implement extended predicates in that tool.

  • Ports to other operating systems. All that's required is a C++ development environment for the platform, to build the Amzi! virtual machine (WAM) for that environment. The Prolog code is all machine independent. This work involves setting up the make files for that environment, and, maybe, if necessary, some changes to the internal module that works with environment specific I/O. That last bit should not be necessary for ports to various Unix environments.
  • Interfaces. The Amzi! engine has a full C API included that is designed to make it easy to integrate Prolog with other software tools. There are many that are supported, and are included, but these could be updated, and others could be added by following the templates of the existing interfaces. These projects might either be language wrappers, such as for Java or .NET, or extensions. Examples of extensions are the modules that implement extended predicates for allowing Prolog to access MySQL, ODBC, and TclTk. These do not involve rebuilding any of the Amzi! core.
    • Language Wrappers. The C API has a rich set of functions for loading and querying Prolog code, and moving easily between the native language representation of variables and Prolog terms coming and going. These C functions can be used to implement the same functions in other languages, using the native syntax of that language. Some examples are the Java and .NET interfaces included with the system.
    • Prolog Extensions. The C API also has functions that support the creation of extended predicates in other languages. These appear to the Prolog system as internal built-in predicates. For example, the MySQL extended predicate library lets Prolog directly interact with MySQL databases using Prolog predicates that reflect the various MySQL functions. The TclTk interface does the same for TclTk.

The Amzi! Prolog + Logic Server project is composed of three sub-projects:

  • APLS - The core system, engine, listener, compiler, runtime
  • Interfaces - A project with subdirectories for various external interfaces, such as Java, .NET, MySql, TclTk...
  • IDE - An Eclipse project for building the Eclipse plug-in for Amzi! Prolog, including the four-port graphical debugger.

For details, see the devdocs directory in the apls project.

Prolog Course

Slides, exercises and sample code for a Prolog course taught by Amzi! in numerous commercial establishments.

The courses were derived from the approach taken to teaching Prolog used in Adventure in Prolog. Over time the samples changed from an interactive fiction game to an airline reservation system. Somehow a boring business system seemed better than a fun game.

And besides, the first company hiring me to teach Prolog was doing exactly that. Their system went on to be the basis of the scheduling software in a number of today's commercial airline sites, and as such was a great example of what can be done with Prolog.


ARulesXL was supposed to be the the killer app for Amzi! It easily allows executable business rules to be entered in spreadsheet cells, and for those rules to reason over data in some cells, and post results in others. For example, a loan approval application might have all the rules for loans, which reason over the cells with client data, and then output to other cells the result and reason.

It was inspired by a DoD research project to integrate reasoning with spreadsheets, and funded by a large accounting firm for building, successfully, a complex financial analysis application. It was used to implement the best vaccination forecast/analysis system available for pediatric medical records software, allowing for all sorts of complex conditions like missing doses, late doses, interactions between vaccines, yet easily updateable by the medical experts directly in matters of minutes.

Yet, despite many downloads, it never really took off. I think the rule language needs another generation of refinement. Maybe some of the logic programming control structures used in it are difficult for typical spreadsheet users to master.

ARulesXL is a perfect example of the sort of application that can be built with Amzi! Prolog + Logic Server. The rule language and reasoning engine are written in Prolog. Prolog DCG provides a powerful tool for creating such a language. (It would not be difficult to create a totally different syntax/rule language and use it instead.) Microsoft Visual Basic for Applications (VBA) is used to integrate the rule language with the spreadsheet.

Give it a try and let us know what you think. There are lots of samples that demonstrate what can be done with it.


EVA is a tool for creating vaccination analysis and forecasting software. It has a complete framework that understands vaccines and all that's required to add/modify vaccination rules is to enter the specific information about a vaccine. It is designed to be maintained by people with pediatric knowledge, rather than programming knowledge.

The system is implemented using Amzi! ARulesXL software. All of the data and tables and rules are entered in spreadsheet cells. They can be developed and tested in the Excel environment, which supports a database of test cases that can be used for regression testing as rules change.

Once the knowledge is working as desired, the knowledge base can be exported into a format that can be easily integrated into any other application development environment, such as Java, .NET or Delphi.

EVA is the basis of the vaccination knowledge used in Office Practicum, pediatric software that consistently wins benchmark tests for having the best vaccination forecasting and analysis. This is because it can easily model missing schedules, complex interactions, and vaccine heirarchies.


KnowledgeWright was one of my favorite Amzi! products. It brought together many of the features I felt made Prolog such a powerful tool for knowledge engineering. That is, Prolog is a fantastic language for creating other languages and reasoning engines.

There is discussion on the merits of domain specific languages. The advantage is you have a language for specifying knowledge that fits well with the domain, making development and maintenance much easier. The down side is you have a specialized tool to maintain as well.

With Prolog it is relatively easy to create domain specific languages, so that the cost of doing so is much less than with other tools.

KnowledgeWright uses Prolog to create a framework for knowledge engineering languages. It includes a basic syntax for specifying knowledge, and a reasoning engine for reasoning over that knowledge. Both are highly customizable, and there are samples showing this. A customization is called a 'jig'.

The naming of KnowledgeWright was part of it's appeal. A 'wright' is one who crafts things, like a wheel wright. A jig is a specialized tool for building a specific sort of thing. So there can be jigs for support applications, or sales, or whatever.

For whatever reason, KnowledgeWright was never a huge commercial success, but it continues to have users around the globe. For those who are interested in taking this tool further, or working with it more, here it is. If you have any questions about it, well it's been a long time since this code was written, but feel free to ask.

The current distribution of KnowledgeWright was developed on Windows, but the system is all Java and Prolog and not dependent on Windows. The open source project could be easily modified to run on other platforms.


This repository contains the binary distributions for the projects, also available on this site.