Visual Prolog

Print Print
Reading time 5:9

Visual Prolog
Visual Prolog IDE Screenshot.png
Paradigmmulti-paradigm: logical, functional, object-oriented, imperative
DeveloperPDC A/S
Stable release
10 build 1000 / April 15, 2021; 59 days ago (2021-04-15)
Typing disciplinestatic, strong, inferred
OSMicrosoft Windows
LicenseProprietary
Websitewww.visual-prolog.com

Visual Prolog, formerly known as PDC Prolog and Turbo Prolog, is a strongly typed object-oriented extension of Prolog. As Turbo Prolog, it was marketed by Borland but it is now developed and marketed by the Danish firm Prolog Development Center (PDC) that originally developed it. Visual Prolog can build Microsoft Windows GUI-applications, console applications, DLLs (dynamic link libraries), and CGI-programs. It can also link to COM components and to databases by means of ODBC.

Logic languages are traditionally interpreted, but Visual Prolog is compiled. This provides the important improvement of converting traditional Prolog-typical run-time errors to compiler warnings, which ensures a better robustness of the finished applications.

The core of Visual Prolog are Horn clauses, algebraic datatypes, pattern matching and controlled non-determinism like in traditional Prolog, but unlike traditional Prolog, Visual Prolog has always been strongly and statically typed.

History

Version 10 introduces object expressions, support for master/slave processes, Microsoft Edge webView2 control and some support for Direct2D+DirectWrite+Windows Imaging Component (see also Visual Prolog 9 New Features).

Version 9 introduces bounded polymorphism, extension predicates, threadsafe lock free fact databases, named parameters (see also Visual Prolog 9 New Features).

Version 8 introduces presenters, for more user friendly data presentation in debugger and running program (see also Visual Prolog 8 New Features).

Version 7.5 contains http server and LALR(1) parser generator (see also Visual Prolog 7.5 New Features).

Version 7.4 can generate 64 bit windows code (see also Visual Prolog 7.4 New Features).

Version 7.3 introduced generic classes and interfaces (see Generic programming), guarded monitors (see also Visual Prolog 7.3 New Features).

Version 7.2 introduced anonymous predicates (a logical pendant to anonymous functions) and namespaces (see also Visual Prolog 7.2 New Features).

Version 7.0 introduced parametric polymorphism.

Since version 6.0 the language has been fully object-oriented.

Hanoi example

In the Towers of Hanoi example, the Prolog inference engine figures out how to move a stack of any number of progressively smaller disks, one at a time, from the left pole to the right pole in the described way, by means of a center as transit, so that there's never a bigger disk on top of a smaller disk. The predicate hanoi takes an integer indicating the number of disks as an initial argument.

class hanoi 
   predicates 
       hanoi : (unsigned N). 
end class hanoi 
 
implement hanoi 
   domains 
       pole = left; center; right. 
 
   clauses 
       hanoi(N) :- move(N, left, center, right). 
 
   class predicates 
       move : (unsigned N, pole A, pole B, pole C). 
   clauses 
       move(0, _, _, _) :- !. 
       move(N, A, B, C) :- 
           move(N-1, A, C, B), 
           stdio::writef("move a disc from % pole to the % pole\n", A, C), 
           move(N-1, B, A, C). 
end implement hanoi 
 
goal 
   console::init(), 
   hanoi::hanoi(4).

Reception

Bruce F. Webster of BYTE praised Turbo Prolog in September 1986, stating that it was the first Borland product to excite him as much as Turbo Pascal did. He liked the user interface and low price, and reported that two BYU professors stated that it was superior to the Prolog they used at the university. While questioning the market demand for the language, Webster concluded that "Turbo Prolog may be as significant a leap in software design as Turbo Pascal represented three years ago", and recommended it to those "at all interested in artificial intelligence, databases, expert systems, or new ways of thinking about programming".[1] Another author in the magazine that month wrote that the language's nonstandard, more structured syntax as making "source listings much more readable than those of standard Prolog". While stating that it had "many good features", he stated that Turbo Prolog's "Turbo Pascal flavor in its compiler and strong data typing ... create an identity problem for the language". Describing it as "Turbo Paslog", the author concluded that he does "not recommend it if you are seriously considering becoming a Prolog programmer".[2] The magazine in 1989 listed Turbo Prolog 2.0 as among the "Distinction" winners of the BYTE Awards, approving of how Borland had "developed a system for real-world applications programming".[3]

Books about Visual Prolog

  • Thomas W. de Boer, A Beginners Guide to Visual Prolog
  • Eduardo Costa, Visual Prolog for Tyros
  • Giovanni Torrero, VISUAL PROLOG PER PRINCIPIANTI Italian 113 pages (pdf)
  • Randall Scott, A Guide to Artificial Intelligence with Visual Prolog, ISBN 978-1-4327-4936-1

See also

References

  1. ^ Webster, Bruce F. (September 1986). "Two Fine Products". BYTE. p. 335.
  2. ^ Shammas, Namir Clement (September 1986). "Turbo Prolog". BYTE. p. 293.
  3. ^ "The BYTE Awards". BYTE. January 1989. p. 327.

External links

  • Official website

By: Wikipedia.org
Edited: 2021-06-18 18:21:51
Source: Wikipedia.org