Navigation  without Java Scripts

Newsletter
February 1996 UK issue D issue
Graphical text: Newbox2.jpg (13005 bytes)

Visual Prolog is here ! - Buy it now from your local dealer.

Visual Prolog 4.0

We at PDC are all very proud to present the final release-version ofthe Visual Prolog system. PDC's development team (distributed between Atlanta,USA, Copenhagen, Denmark and St. Petersburg, Russia) has been working practicallynight and day for the last several months to complete Visual Prolog. It'sfinally here!
With Visual Prolog, you gain all the traditional advantages of workingwith Prolog, but using a rich state-of-the-art development environmentwith all the tools needed to make sophisticated MS-Windows 3.x, Windows95, NT or OS/2 PM applications.

Standard and Professional Versions

Visual Prolog comes in two versions: Standard and Professional. TheStandard Version is a complete development environment for developing 16bit applications for Windows 3.1 or Win95. The Professional Version addsthree important features:

  1. 32 bit development for Windows 95, NT or OS/2.
  2. The complete Prolog source code to the Visual Development Environment
  3. The Visual Prolog compiler in library form. This allows you to relinkthe VDE with source code changes, and even to include the Prolog compilerwithin your own application (requires a supplementary license).

To create 32-bit Windows executables for NT or Win95, you must alsohave Visual C++. To create 32-bit OS/2 executables, you need either BorlandC++ for OS/2 or IBM CSet. The Professional Version includes both a 16-bitWindows version of the Visual Development environment, as well as a 32-bitversion. A 32-bit OS/2 version of the of the development environment willbe provided free of charge when complete.

Well Tested

Visual Prolog has been in beta testing for about 18 months and the userstold us that it's powerful, easy to use and remarkably reliable for a betaimplementation. The feedback has improved with every successive beta version,and among the comments were:

I'm enjoying VIP - it's a brilliant piece of software
I would like to thank you for an excellent product. It fits in verywell for the development work I am doing.
I'm enjoying using Visual Prolog. It's very functional and logical.
By the way I enjoy your external db system very much. I do marvelousthings with it, and the speed is stunning.

Our customers also gave us important feedback on areas where we couldimprove the product. Since PDC is committed to building customer satisfactionwe've done our best to address a number of these areas in this new releaseof Visual Prolog.

The AI Language

In today's complex programming world, we believe that more than everProlog has merit. Prolog was originally designed to be an AI language,and it is of course very well suited for expert sys-tems, planning systemsand similar AI applica-tions. Frame or rule-based systems, forward or backwardchaining, pat-tern matching, and constraint-resolution systems are allnatural and elegant expressions of Prolog's underlying semantics.

And Much More

However, the strengths of Prolog extend far beyond the boundaries ofAI. The high level of abstraction, the ease and simplicity with which complexdata structures are represented, and the protection and safety inherentin the language allow for a consider-able reduction of development timesin any discipline or problem-solving strategy. Building advanced com-mercialand industrial applications based on today's windowing environments demandsjust such a tool.

Visual Prolog addresses the same target market as SQL Database Systems,C++ development systems or other language tools like Visual Basic, Borland'sDelphi, or IBM's Visual Age. While there is a trend in many organizationstoday to solve everything with database technology, this approach oftenleads to bad results in both development time and the performance of thefinal system.

An application developed in Prolog will often have superior performanceand a higher degree of user-friendliness combined with shorter developmenttimes.

Visual Prolog programs are very fast because of PDC's highly optimizingcompiler - in many cases com-parable to those created with C or C++. And,as an increasing number of organizations find it difficult and error-proneto develop programs in C++, negligible speed differences in the final applicationsare increasingly hard to justify.

 

Visual Prolog is now delivered on CD

With all the features of the Professional version installed, it occupiesmore than 100 Mbytes of hard disk! Since it now requires 19 compresseddisks to install Visual Prolog, we decided it was time to go to CD, withall the added benefits. The CD contains a setup directory for installingthe Visual Prolog system, but it also contains a complete ready-made installationso it is possible to run Visual Prolog directly from the CD. There wasalso room to add some shareware tools to the CD like the Microsoft Wordviewer

.cd1.jpg (12195 bytes)

Visual Prolog Documentation

Getting Started: Provides an overview of Visual Prolog and explainshow to install it. The book also contains a detailed example called the"Guided Tour", a good starting point for learning how to builda Windowing application in Visual Prolog. Language Tutorial: This gives a step by step introduction tothe Prolog Programming language and the core built-in functions

 

Visual Development Environment:This book explains how to usethe Development Environment for Visual Prolog, including the various resourceeditors, code experts etc.



Visual Programming Interface:This describes the VPI, which isthe portable, graphical API which has been developed for Visual Prolog.The complete MS-Word files for the books are also included on the CD alongwith the Microsoft Word viewer for reading the files on-line or makingprint-outs..

 

Example Visual Prolog Applications

New Features of Visual Prolog

Code Experts

The greatest strength of Visual Prolog is probably the combination ofthe Layout tools and the Code Experts.The code experts take care of much of the work for you, meaning that youcan create a new application in a few minutes, and incrementally en-hancethis from a prototype to your final application. Trivial work is donefor you automatically'

Experts
Editors
Additional Features

 

Extra Tools shipped with Visual Prolog

Other Visual Prolog Facilities

A Fast, Optimizing Compiler

The compiler generates tight native machine code that can compete withthe code generated by Pascal or C compilers. The compiler performs severaldifferent analyses ranging from a global flow analysis and determinismcheck down to register allocation and peep-hole optimization.

Type System and Flow-Analyzer

A distinguishing characteristic of PDC's version of Prolog is its typesystem which provides an extra level of security in programming. The typedeclarations document the code and allow the compiler to helpfully pointout common typing mistakes as well as more serious logic mistakes in theearly stages of development. By serving as a type of contract between programmerand development over the entire product life-cycle.

Database Subsystem

A fast and extremely flexible database subsystem makes Visual Prologa more suitable choice for database applications than many 4GLs. The databasesystem supports a collection of distinct ordered chains of Prolog terms,where database terms can be any abstraction supported by the language itself,from traditional records to lists, trees or graphs.
The database system can directly access individual terms, or it can backtrackthrough chains of terms to generate or match particular values. The termscan be stored in any one of three locations: in a file, in memory or inEMS-type expanded memory (under DOS). The database also supports B+ trees,which provide fast data retrieval and the ability to change term orderingefficiently.
If you are using the database in a LAN application you can take advantageof Visual Prolog's support for file sharing in the external database system.Multi-user database access is provided using a mechanism that efficientlyserializes file access inside of transactions. This means that a Prologdatabase can be opened by several users simultaneously.

SQL Bindings

Visual Prolog's external database system is often the fastest and mostflexible way to store large amounts of data. However data might alreadyexist in another database system, or the application might need to sharedata with other applications that can only make use of particular databasetechnology. In such cases, it becomes extremely important to be able tolink to external database systems, and Visual Prolog's portable SQL bindingsmake this simple for most databases.

Inter-process Communication

The OS/2 version of Visual Prolog adds support for full-featured asynchronousinter-process communication using named pipes in a multi-threaded sub-system.Arbitrarily complex Prolog terms can be sent between multiple processeson a single machine or between programs over a network. Database or logicservers can easily be constructed with this facility. On the Windows platform,NETDDE can similarly be used to create Client-Server applications.

Exception Handling and Error Trapping

Visual Prolog includes powerful mechanisms for handling run-time errors,as well as controlling user breaks. The programmer may select among variouslevels of error-checking and error-reporting.

Portable Operating System Functions

Visual Prolog provides a portable interface to the operating system.Functions like copying, renaming and deleting files, invoking other programs,returning the date and time, etc. work the same way on all platforms.

Compression Predicates Included

The compression library, which has previously been sold separately,is now included in the Visual Prolog library. This means that Prolog applicationscan easily compress data. This can be used before sending data over a network,before storing pictures or other compressible data in databases, or asin the Visual Prolog installation program, to pack a set files on diskettes.

Installation Tool for VIP Applications

The source code for the setup program, which is used to install theVisual Prolog system, is included. It comes with a companion build program,which based on a script can create compressed diskettes or CD images. Thisgives VIP programmers a free installation program that is more flexiblethan any other tool on the market!

Source Code to VDE Included

If you have the Professional Version of Visual Prolog, you will findthe Prolog source code for the Visual Development Environment in the VDESRCsub-directory, which allows you to do any customization of the VDE you want.

Examples of Visual Prolog Code

The following code fragment shows the code required to create a windowwith a tree display of the include structure of the Visual Prolog VDE.The predicate collect_tree builds the tree structure in the usual findallloop. The predicate project_tree_ event is the event-handler that willreceive notice of any actions in the window. In this case, there are provisionsonly for closing the window, and in the event the user double-clicks ona node. In this case, the editor is activated with the corresponding sourcetext.

/***********************************************
        Project tree
***********************************************/

  project_tree_event: EVENT_HANDLER
CLAUSES
  project_tree(W):-
        projectfilename(Project),
        get_exename(Project,ExeName),
        retractall(_, seen_nodes),
        collect_tree(ExeName,9,TREE),
        make_tree_win(W,"Test tree",TREE,[],
                                  project_tree_event,_),!.
  project_tree_event(W,e_CloseRequest,0):-
        win_Destroy(W),
                   !.
  project_tree_event(W,e_MouseDbl(_,_,_,_),0):-
        get_selected_node(W,FileName),!,
        not_bin_file(FileName),
        open_file_editor(FileName).

The next example shows how to use the dialog package to handle a dialog.The dialog package takes care of initializing all parts of a dialog, andit does various type and range checks on the input fields. After the dialogis completed, it delivers the output values in a list. Note that this codeis generated automatically when the dialog is designed using the dialogeditor.

PREDICATES
        setup_env % Brings up the dialog
        % Handle the return values
        setup_env(DLG_VAL_LIST, INTEGER)
CLAUSES
setup_env:-
        saveconfig(SAVECONFIG), % Get the variable from fact
        saveedit(SAVEEDIT), % Another variable
        new_modal_dialog(d_env, "Environment",
            [df(d_env_saveconfig,checkbox(SAVECONFIG),nopr),
             df(d_env_saveedit,checkbox(SAVEEDIT),nopr)
            ],[],no_validation,no_user_action,VALLIST,ANSWER),
        setup_env(VALLIST,ANSWER).

The final example shows what code is needed to create a window witha toolbar on the right side. This code can be generated automatically bythe resource expert. The various constants are resource identifiers whichname the icons used as button images.

Screen Dump

toolbar_create(tb_right,color_blue,W,
      [tb_ctrl(1, pushb, tbcut_up,  tbcut_dn,   "",b_true,b_true),
       tb_ctrl(2, pushb, tbcopy_up, tbcopy_dn, "",b_true,b_true),
       tb_ctrl(3, pushb, tbok_up,   tbok_dn,    "",b_true,b_true),
       tb_ctrl(11,checkb,switch_off,switch_on, "",b_true,b_true),
       separator,
       tb_ctrl(12,checkb,rot_off,   rot_on,     "",b_true,b_true),
       separator,
       tb_ctrl(4, pushb, flower_up, flower_dn, "",b_true,b_true),
       separator,
       tb_ctrl(5, pushb, tbcopy_up, tbcopy_dn, "",b_true,b_true),
       tb_ctrl(6, pushb, tbok_up,   tbok_dn,    "",b_true,b_true)
      ], toolbar_action).

The Visual Prolog WWW Homepage

The address of the homepage for Visual Prolog is: http://www.visual-prolog.com
From the Visual Prolog WWW homepage, you can read the latest news aboutVisual Prolog, study the Frequent Asked Questions (FAQ) or download patches.You can also query our sales department via E-mail and you can even orderour products and upgrades on-line. Feedback to our support department andbug reporting are also possible.
As a new service, we have started to upload new versions of VIP tools whenthere are new features or new tools. The tools are maintained with versionnumbers and documents that describe how to use and manage the tools. Wethink this will be a popular service, and we even hope that users willcontribute their own tools here.