Visual Prolog, previously known as PDC Prolog and Turbo Prolog, is a strongly typed object-oriented extension of
Prolog
Prolog is a logic programming language that has its origins in artificial intelligence, automated theorem proving, and computational linguistics.
Prolog has its roots in first-order logic, a formal logic. Unlike many other programming language ...
. It was marketed by
Borland
Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
as Turbo Prolog (version 1.0 in 1986 and version 2.0 in 1988). It is now developed and marketed by the Danish firm PDC that originally created it. Visual Prolog can build
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
GUI-applications,
console application
A console application or command-line program is a computer program (applications or utilities) designed to be used via a text-only user interface.
A console application can be used with a computer terminal, a system console, or a terminal emu ...
s,
DLLs (dynamic link libraries), and
CGI-programs. It can also link to
COM components and to
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s by means of
ODBC
In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. An ...
.
Visual Prolog contains a
compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
which generates
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
and
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
machine code. Unlike standard Prolog, programs written in Visual Prolog are
statically typed
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
. This allows some errors to be caught at compile-time instead of run-time.
History
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
The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
'' 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".
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".
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".
Books about Visual Prolog
* Thomas W. de Boer
A Beginners Guide to Visual Prolog*
Chinese translation* Eduardo Costa
Visual Prolog for Tyros
*
Russian translation*
Chinese translation* Giovanni Torrero
VISUAL PROLOG PER PRINCIPIANTI''Italian'' 113 pages (pdf)
* Randall Scott, A Guide to Artificial Intelligence with Visual Prolog,
See also
*
Comparison of Prolog implementations
The following Comparison of Prolog implementations provides a reference for the relative feature sets and performance of different implementations of the Prolog computer programming language. A comprehensive discussion of the most significant Pro ...
*
Logtalk
Logtalk is an object-oriented logic programming language that extends and leverages the Prolog language with a feature set suitable for programming in the large.Paulo Moura (2003). Logtalk: Design of an Object-Oriented Logic Programming Language. ...
*
Mercury (programming language)
Mercury is a functional logic programming language made for real-world uses. The first version was developed at the University of Melbourne, Computer Science department, by Fergus Henderson, Thomas Conway, and Zoltan Somogyi, under Somogyi's ...
*
Prolog syntax and semantics
References
External links
* {{Official website, //www.visual-prolog.com
Class-based programming languages
Borland software
Integrated development environments
Multi-paradigm programming languages
Prolog programming language family
Functional logic programming languages
Object-oriented programming languages
Statically typed programming languages
Programming tools for Windows
Programming languages
Compilers