Use Prolog to knock the code, feel comfortable.
Prolog programming paradigm, the degree of abstraction is much higher than the middle, low-level C language and so on. Tap the code of the source length, at least 50% less than the C language savings.
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 with its predecessor, Turbo Prolog, and PDC Prolog same strain. Are compiled software that has strict type restrictions.
Compared to other explanatory type Prolog. Visual Prolog executes much faster.
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 number 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.
So, I just use version number 5, and stick with it 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. "Animal classification and identification expert system"--geni using webcgi technology.
First of all. Install the execution Geni to understand its basic situation.
1. Installation Configuration Serverapache
Geni is a CGI program that performs dependent Httpserver. I'm using Apache 2.2.
Configure the virtual host for Geni, such as the following:
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. 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 implementation expert system Geni
The so-called installation, in fact, is a simple copy
D:\VIP52\WWW\INETPUB\GENI folder, complete copy to D:\Apache2.2\htdocs
Start Apacheserverhttpd.exe
Open the address in the browser http://localhost/default.htm
An illustrated webpage, Geni debut.
Web expert system for Visual Prolog (1)