Visual Prolog

Visual Prolog

Infobox software
name = Visual Prolog


caption = IDE Screenshot
paradigm = multi-paradigm: imperative, functional, object-oriented
developer = [http://www.pdc.dk Prolog Development Center]
latest release version = 7.1
latest release date = July 2007
typing = static, strong, inferred
operating system = MS Windows 2000/XP/Vista
genre = Programming language
license = Proprietary
website = [http://www.visual-prolog.com/ www.visual-prolog.com]

Visual Prolog, also 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.

Visual Prolog is compiled rather than interpreted, as is traditional for logic languages. This provides for an execution speed comparable to C++,Fact|date=January 2008 and the important improvement of converting traditional prolog-typical runtime-errors to compiler warnings, which ensures a better robustness of the finished applications.

The core of Visual Prolog are Horn clauses, pattern matching and controlled non-determinism like in traditional Prolog, but unlike traditional Prolog, Visual Prolog has always been strongly and statically typed. Since version 6.0 the language has been fully object-oriented, and in version 7.0 parametric polymorphism was introduced.

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 ('left') pole to the right pole ('right') in the described way, by means of a center ('center') pole as transit, so that there's never a bigger disk on top of a smaller disk. The predicate 'hanoi' takes an integer = the number of disks, as an initial argument.In real-life, Visual Prolog is especially suited for intricate problems, such as resource planning, etc. As the example shows, Visual prolog can be used for quick 'programming in the small,' but it is mostly employed for industrial-strength large applications.

Hanoi Example

class hanoi predicates hanoi : (unsigned N). end class hanoi implement hanoi domains pole = string. clauses hanoi(N) :- move(N, "left", "centre", "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 ", A, C), move(N-1, B, A, C). end implement hanoi goal console::init(), hanoi::hanoi(4).

ee also

* Object-oriented programming
* Logic programming
* Prolog

External links

* [http://www.visual-prolog.com/ Official Visual Prolog Home Page]
* [http://www.pdc.dk/ Prolog Development Center]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Visual Prolog — Тип Язык программирования Разработчик Prolog Development Center Операционная система MS Windows 2000/XP/Vista/Seven Последняя версия 7.3 (13 мая 2010) …   Википедия

  • PROLOG — Pour les articles homonymes, voir Prolog (homonymie). Prolog est l’un des principaux langages de programmation logique. Le nom Prolog est un acronyme de PROgrammation LOGique. Il a été créé par Alain Colmerauer et Philippe Roussel vers 1972. Le… …   Wikipédia en Français

  • Prolog — infobox programming language paradigm = Logic programming year = 1972 designer = Alain Colmerauer implementations = BProlog, ECLiPSe, Ciao Prolog, GNU Prolog, Quintus, SICStus, Strawberry, SWI Prolog, YAP Prolog, tuProlog dialects = ISO Prolog,… …   Wikipedia

  • Prolog — Pour les articles homonymes, voir Prolog (homonymie). Prolog Apparu en 1972 Auteur …   Wikipédia en Français

  • Visual-C-Sharp-Express — Visual Studio Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

  • Visual J++ — Visual Studio Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

  • Visual Studio — Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

  • Visual Studio.NET — Visual Studio Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

  • Visual Studio .NET — Visual Studio Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

  • Visual Studio 2005 — Visual Studio Entwickler: Microsoft Corporation Aktuelle Version: 2008 (19. November 2007) Betriebssystem: Windows Kategorie …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”