Visual Prolog
   HOME

TheInfoList



OR:

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 associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
. As Turbo Prolog, it was marketed by Borland but it is now developed and marketed by the Danish firm PDC that originally created it. Visual Prolog can build Microsoft Windows
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
-applications,
console application A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command-line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most gr ...
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 stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
s by means of ODBC. Visual Prolog contains a
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
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 Intel 8086 microprocessor and its 8088 variant. The 8086 was intr ...
machine code. Unlike standard Prolog, programs written in Visual Prolog are statically typed. This allows some errors to be caught at compile-time instead of run-time.


History

Version 10 introduces object expressions, support for master/slave processes,
Microsoft Edge Microsoft Edge is a proprietary, cross-platform web browser created by Microsoft. It was first released in 2015 as part of Windows 10 and Xbox One and later ported to other platforms as a fork of Google's Chromium open-source project: Android ...
webView2 control and some support for
Direct2D Direct2D is a 2D vector graphics application programming interface (API) designed by Microsoft and implemented in Windows 10, Windows 8, Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows Server 2008 (with Platform Update i ...
+
DirectWrite DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was first shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Win ...
+
Windows Imaging Component Windows Imaging Component (WIC) is a COM-based imaging codec framework introduced in Windows Vista (and later available in Windows XP Service Pack 3) for working with and processing digital images and image metadata. WIC enables application ...
(see als
Visual Prolog 10 New Features
. Version 9 introduces bounded polymorphism, extension predicates, threadsafe lock free fact databases, named parameters (see als
Visual Prolog 9 New Features
. Version 8 introduces presenters, for more user friendly data presentation in debugger and running program (see als
Visual Prolog 8 New Features
. Version 7.5 contains http server and LALR(1) parser generator (see als
Visual Prolog 7.5 New Features
. Version 7.4 can generate 64 bit windows code (see als
Visual Prolog 7.4 New Features
. Version 7.3 introduced generic classes and interfaces (see
Generic programming Generic programming is a style of computer programming in which algorithms are written in terms of types ''to-be-specified-later'' that are then ''instantiated'' when needed for specific types provided as parameters. This approach, pioneered b ...
), guarded monitors (see als
Visual Prolog 7.3 New Features
. Version 7.2 introduced anonymous predicates (a logical pendant to
anonymous functions In computer programming, an anonymous function (function literal, lambda abstraction, lambda function, lambda expression or block) is a function definition that is not bound to an identifier. Anonymous functions are often arguments being passed t ...
) and namespaces (see als
Visual Prolog 7.2 New Features
. Version 7.0 introduced
parametric polymorphism In programming languages and type theory, parametric polymorphism allows a single piece of code to be given a "generic" type, using variables in place of actual types, and then instantiated with particular types as needed. Parametrically polymorph ...
. Since version 6.0 the language has been fully
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of p ...
.


Hanoi example

In the
Towers of Hanoi The Tower of Hanoi (also called The problem of Benares Temple or Tower of Brahma or Lucas' Tower and sometimes pluralized as Towers, or simply pyramid puzzle) is a mathematical game or puzzle consisting of three rods and a number of disks of v ...
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 uni ...
'' 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 Brigham Young University (BYU, sometimes referred to colloquially as The Y) is a private research university in Provo, Utah. It was founded in 1875 by religious leader Brigham Young and is sponsored by the Church of Jesus Christ of Latter-day S ...
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 *
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 su ...


References


External links

* {{Official website, //www.visual-prolog.com Class-based programming languages Borland software compilers and interpreters Integrated development environments Multi-paradigm programming languages Prolog programming language family Logic programming languages Functional logic programming languages Statically typed programming languages Programming tools for Windows