Navigation  without Java Scripts

Spring ’98

Welcome to a newsletter with lots of Internet and logic programming news! With this newsletter we present Visual Prolog version 5.01. In this release we have removed some bugs reported in the initial 5.0 release and added a few nice features.

On the various Visual Prolog homepages, we have added some examples of how to combine logic programming and the Web. This is also the theme of our first tutorial, "Build a Web-Application in 1 hour".

We will also take a look at some of the projects that users have developed in Visual Prolog.

Table of Contents

Visual Prolog 5.01
A Taste of AI on the Web….
ESTA
Visual Prolog Builds Virtual Shopping Mall
Tutorial: Build a Web-App in 1 Hour!
How to do Web-Applications in Visual Prolog
Visual Prolog 5.X and Year 2000 Compliance
Try Visual Prolog – Before You Buy!
Product, using Visual Prolog
3rd Party Tools for Visual Prolog Programmers
Visual Prolog on the PAP-Conference

Visual Prolog 5.01

We have received a lot of positive response from the release 5.0. This free maintenance release consists of fixes to the various modules in Visual Prolog 5.0. For instance some important changes have been made in the handling of objects and classes. All the modifications have been compiled to a number of patch-files that can be downloaded from the Visual Prolog web-sites, free of charge. You can read about all the fixes on our new Support-web. Click on "Support and Updates" from any of the PDC web-sites.

Debugger Update

The Visual Prolog debugger has already proven its value and become an indispensable tool for Visual Prolog developers. For many, the debugger in itself has been reason enough to upgrade to the 5.0 version. The debugger has also proven its value as an aid to learning and understanding how Visual Prolog works.

(click to view full picture)

Version 5.01 offers some nice enhancements to the debugger. It is now more closely integrated with the Visual Prolog environment: a Project->Debug menu entry brings the current project directly up in the debugger. There are also a number of smaller enhancements like:

It is now possible to scroll in the variable inspector to see the contents of long strings or lists.
In the call stack you can now see the arguments of the predicates.
It is possible to set up a VPI event inspector.
It is possible to open a view that displays the open files

(click to view full picture)

For all the details and how to download the PATCH, please see the WEB!

A Taste of AI on the Web….

You can now examine example programs that illustrate PDC’s ideas about the next generation of web-development. Try out the fascinating possibilities of using AI-based programs on the net yourself. We have put some of the examples from the Visual Prolog documentation on the Visual Prolog websites. From the PDC-websites click "Demo Examples" and follow the instructions from here.

(click to view full picture)

Try out logic examples directly on the web:
Equation Solver Examine how to communicate intelligently with an application
Hanoi The ancient problem solved on the web.
Route Web-version of the travelling salesman.
FWCG The farmer/wolf/goat/cabbage problem.
Zebra The five house logic puzzle.
Nqueen How to place N queens on a chessboard.
Sen_an Analyzing the grammar of a sentence.
Wordbreak Suggesting where to break words.
Hardware How to simulate hardware logic on the web
Geni A small example, that shows how to build expert systems on the web
Diff Symbolic differentiation
Geobase an illustrative example of a natural language interface

ESTA

The examples mentioned above are small examples, but the web support in Visual Prolog isn’t in any way limited to "toy" problems. If you want to examine more realistic expert systems, try our WEB-based ESTA with the SANOCOR knowledge-base, the expert system shell that has been used on Norwegian oil rigs. ESTA is a very easy to use expert system shell, which is powerful enough for handling real-world problems.

ESTA is the perfect tool for structuring knowledge (for example, to use in help desks) and this structure can now be accessed directly from the web.

This web-version of ESTA could be the answer to your needs for automatic support functions. Try it out, it’s free to use, when purchased with Visual Prolog.

 

(click to view full picture)

PDC's expert system shell, ESTA, is a great stand-alone environment for constructing advisory and decision support systems. Building advanced knowledge bases with ESTA requires no previous programming experience and it is suitable for many problem domains.

You can use ESTA to build advisory systems that ensure:
Accessibility of knowledge
Delegation of decision competence
Secure and homogeneous decision making
Preservation of valuable knowledge
Fast and easy information retrieval
Easy and cost efficient document maintenance
Relief for overworked employees

ESTA includes an interface to Visual Prolog, which means that you can go beyond the built in functionality - you can build your own extensions to ESTA or integrate ESTA into an existing Visual Prolog application. (This will require Visual Prolog programming experience).

In addition to advisory systems, ESTA is a great prototyping tool. A knowledge base in ESTA has a hierarchical structure from which a tree display is automatically drawn. You can edit or expand your knowledge base directly from the tree. This way you can easily get an overview of your knowledge.

Visual Prolog Builds Virtual Shopping Mall

PDC’s Swedish distributor, CapCad, has proved that Visual Prolog is the right tool for the Internet. The Director of CapCad, Mr. Steen Kvamme has developed all the shopping cart facilities for Academic Publishers, Sweden (http://www.akg.se/) and turned their website into a virtual shopping mall. He used the LINUX version of Visual Prolog, but the program is portable to Win 95/98/NT, OS/2 and SCO UNIX.

Look around, examine the goods, select some, and put them in the basket and at last – pay.

YOUR customers can also take advantage of the real world AI-apps that you have chosen to put on YOUR homepage. Use Visual Prolog for your do web-applications! Welcome to a web where the homepages aren’t just dusty bookshelves with information, but a place to do business!

Tutorial: Build a Web-App in 1 Hour!

Download example-files

Now that you’ve seen some examples, in this section we will explain step-by-step how to actually make Visual Prolog communicate over the World Wide Web.

The web-applications that you make in Visual Prolog can be built in a platform-independent manner. There are no restrictions about running on OS/2, Linux, SCO UNIX or Windows-based platforms.

Before you start working on your first web-application, you should be sure that you have installed a web-server. In Microsoft Windows NT, Peer Web Services is included. Microsoft Windows 95 and 98 users can download Personal Web Server from http://www.microsoft.com/msdownload

You will also need the Visual Prolog version 5.xx Professional.

A Little Web server Basics

(click to view full picture)

When the user browses the Internet, he/she sends requests for information (a URL) from a browser to a web server (1). This URL in most cases corresponds to a file which the webserver locates in its file-system. The contents of the file is sent back to the browser (2).

 

 

 

The situation is similar when dealing with executable files. The browser sends requests like (1). This corresponds to an executable, which the webserver runs, and whose output is sent back to the browser.

How to do Web-Applications in Visual Prolog

Step 1: Create a directory for the website MyWeb (e.g. c:\inetpub\wwwroot\myweb on Windows NT with Peer Web Services). On Windows NT, LINUX and UNIX-platforms you need to set the execute-permissions to the directory from which the program should run.

Step 2: Start the Visual Prolog 5.x environment and create a new text-mode application (Platform: Windows32-bit, UI-strategy: Textmode) with the name demo, the source should look like the following:

GOAL
  write("Content-type:text/html\n\n"),
  write("<HTML>"),nl,
  write("<TITLE>Hello World Demo</TITLE>"),nl,
  write("<P>Hello World!</P>\n"), write("<P><I>from Visual
  Prolog 5.0</I></P>"),nl,
  write("</HTML>"),nl.

The first line is necessary to instruct the webserver that it should return HTML-text. You could also return GIF-images etc. The rest of the statements should be obvious for HTML-programmers!

Compile the application and copy the generated executable (in the example above called demo.exe) to MyWeb.

Step 3: Create an HTML-file with the name demo.htm like the following and copy it to the MyWeb directory:

<html>

<head>

<title>Hello World demo</title>

</head>

<body>

<H1>Run "Hello World"</H1>

<FORM ACTION="demo.exe" method="POST">

<INPUT TYPE="SUBMIT" VALUE="SUBMIT">

</FORM>

</body>

</html>

The directory "Myweb" should now look like this:

Step 4: Open the demo.htm file in the Browser by giving the URL (e.g. http://mymachine/myweb/demo.htm) and click the Run_Hello_World-Demo-link. The application, demo returns the text directly through the webserver. Step 4: Open the demo.htm file in the Browser by giving the URL (e.g. http://mymachine/myweb/demo.htm) and click the Run_Hello_World-Demo-link. The application, demo returns the text directly through the webserver.

(click to view full pictures)

In the next example, we will try to pass input from the web-browser to the executable. This information could for instance be the content of a form, but here we will just try to pass a single parameter. Parameters can be obtained with a call to the comline predicate.

GOAL
  comline(CL),
  write("Content-type:text/html\n\n"),
  write("<HTML>\n"),
  write("<BODY>\n"),
  write("Hello, ",CL,"!"),
  write("</BODY>\n"),
  write("</HTML>\n").

All these example-files can be downloaded from the online version of this newsletter, and you can find many other examples of applications and general information about our web extensions on the Visual Prolog homepages (have a look at the Argument test!).

Visual Prolog 5.X and Year 2000 Compliance

The Year 2000 ("y2k") problem (popular called the "Millennium Bug") arises from the use of a two-digit field to identify years in computer programs (for example 85 = 1985), and the assumption of a single century -- the 1900s. Any software so created will read (or attempt to read) e.g. "00" as the year 1900. Programs that use dates will fail or malfunction if these errors are not corrected.

Visual Prolog 5.0 introduces - as far as PDC knows - no problems with regard to the Year 2000 problem. The only date-related functions in the core language allow for setting and reading the current date from or to the underlying operating system, and thus, with respect to these functions, you should verify the Year 2000 compliance of the underlying operating system. The Visual Prolog programming language defines no particular representation for storing dates within an application, therefore, we can make no specific warranties about the year-2000 compliance of applications developed in Visual Prolog, since these will be year 2000 compliant or not, depending on date representation and data-handling choices made by the application programmer.

Note that both the underlying operating system and the computer where the program is running can also cause problems. We recommend that all Applications be carefully tested to see how they behave around and after the millennium change.

Try Visual Prolog – Before You Buy!

The Visual Prolog Timelocked version has been a tremendous succes. Lots of people have downloaded and tried out Visual Prolog before buying. A new version of the Visual Prolog Timelocked version has been compiled and uploaded. This new version can be tried out for free from the PDC homepages. If you decide to buy it, a simple phone call or an email to sales@visual-prolog.com is all you need to obtain a code that turns the timelocked version into a full First-Step (standard) version of Visual Prolog.

Product, using Visual Prolog

Document Companion

The Document Companion product is a powerful document management system, developed purely in Visual Prolog by Serguei Spenkov. Document Companion is flexible in using ODBC to access any customer database, built-in document management functions and multi-user support. The system is, thanks to its DocuLogic language interpreter, strongly extensible. New rules for new types of documents can be entered. The result is a intelligent, lightning-fast document management system. A timelocked version available from http://www.edmgroup.com/companion.htm

3rd Party Tools for Visual Prolog Programmers

In this newsletter, we have a look at a project, developed in Visual Prolog and some tools for the programmer, who wants to extend the expressive power of Visual Prolog.

Serial Communication and Visual Prolog

CAPCAD has launched a very nice package for controlling serial communications through Visual Prolog. Read more about it on http://www.capcad.se or contact CapCad info@capcad.se

Assembly routines for Visual Prolog

Another nice package is the X86 ASSEMBLY LANGUAGE Enhancements for Visual Prolog 5 and PDC Prolog 3.31. Examine how to combine assembly language and Visual Prolog. 

Visual Prolog on the PAP-Conference

Once again, the "Practical Applications of Prolog" conference showed that the Prolog language is not just an academic construct, but a highly competitive alternative for real-world development. The conference also brought wider public attention to exiting new papers on how to use Prolog. You can read the papers on Visual Prolog on the Visual prolog web-sites (choose Press Releases).

The entire conference proceedings can be bought from The Practical Application Company 

(click to view full picture)