Web expert system for Visual Prolog (1)

Source: Internet
Author: User

Write the program with Prolog, feel comfortable.

Prolog programming paradigm, the degree of abstraction is much higher than the middle, low-level C language and so on. Write the program's source length, at least 50% less than the C language.

Moreover, Prolog's syntax is simple, the symbol choice is natural and reasonable, the eye-pleasing degree is much higher than its "close relative" Erlang.

Visual Prolog and its predecessor, the Turbo Prolog and PDC Prolog same strain, are compiled software with strict type limitations.

The Visual prolog runs much faster than any other interpreted type of Prolog.

However, Visual Prolog is not perfect. The weakness of its weaknesses is precisely its visual function.

The GUI control, which is small in variety and ugly in appearance, is disgusting and does not want to use it as an interface.

After entering version 6 and 7, Visual Prolog introduced class classes, which were completely object-oriented.

A variety of grammatical rules are pouring in, programming patterns are too complex, I do not like.

Therefore, I only use version 5, and, persist without its GUI.

To avoid weaknesses, to play the Visualprolog compiler and inference engine and other tools excellent, avoiding its GUI tools of the short board, a good choice is to use it to do CGI programs, the GUI to the browser processing.

The practical application of Prolog is mainly focused on the development of expert system. Visual Prolog provides an example of an "Animal classification identification expert system"--geni using webcgi technology.

First, install run Geni to get a basic picture of it.

1, install the configuration server Apache

Geni is a CGI program that runs on an HTTP server. I'm using Apache 2.2. To configure a virtual host for Geni, the method is as follows:

Open File D:\Apache2.2\conf\httpd.conf

Locate the statement line #Include conf/extra/httpd-vhosts.conf, delete the # at the beginning of the row, save the file

Open the file D:\Apache2.2\conf\extra\httpd-vhosts.conf and make the following settings:

Namevirtualhost *:80<virtualhost *:80>    documentroot "d:/apache2.2/htdocs/geni"    ServerName localhost    serveralias localhost    <directory "D:/apache2.2/htdocs/geni" >        Options followsymlinks +execcgi        Order Deny,allow        Allow from all    </Directory></VirtualHost>

Check that the virtual machine is configured correctly on the terminal console:

D:\Apache2.2\bin > Httpd-s

Some configuration information will be displayed and the conclusion should be OK

2. Installation and operation expert system Geni

The so-called installation is actually a simple copy

D:\VIP52\WWW\INETPUB\GENI the directory and copy it completely to D:\Apache2.2\htdocs

Start Apache server Httpd.exe

Open the address in the browser http://localhost/default.htm

An illustrated webpage, Geni debut.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.