ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Visual Prolog - Wikipedia, the free encyclopedia

Visual Prolog

From Wikipedia, the free encyclopedia

Visual Prolog

IDE Screenshot
Developed by Prolog Development Center
Latest release 7.1 / July 2007
OS MS Windows 2000/XP/Vista
Genre Programming language
License Proprietary
Website 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++,[citation needed] 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.

[edit] 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\n", A, C), 
           move(N-1, B, A, C). 
end implement hanoi 
 
goal 
   console::init(), 
   hanoi::hanoi(4).

[edit] See also

[edit] External links

Languages


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -