Visual Prolog 7.5 Upgrade Notes

From wiki.visual-prolog.com

This document describes how to upgrade Visual Prolog 7.4 projects to Visual Prolog 7.5, for older projects you should also read Visual Prolog 7.4 Upgrade Notes.

If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in Visual Prolog Discussion Forum.

By default, the installation of Visual Prolog 7.5 will not replace any previously installed versions. It is possible to work with several versions on a single computer.

  • The Commercial Edition will by default be installed in C:\Program Files (x86)\Visual Prolog 7.5 or C:\Program Files\Visual Prolog 7.5.
  • The Personal Edition will by default be installed to C:\Program Files (x86)\Visual Prolog 7.5PE or C:\Program Files\Visual Prolog 7.5PE.

Visual Prolog 7.5 projects are backward-compatible with Visual Prolog 7.4 projects. If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 and vipprj files.

Notice it is highly advisable to have a backup of a project before updating.

When your open a project in the Visual Prolog 7.5 IDE, it will automatically create a new .vipprj project file in XML format instead of the .prj6 files used by previous versions. The .prj6 file will still exist but it will not be updated by Visual Prolog 7.5, so the two files will come out of sync and therefore it is safest to delete the .prj6 file after the update. After loading the project you should rebuild the entire project with the help of the Build | Rebuild All command and answer "Yes to All" to the messages suggesting adding or removing packages and include statements. You may have to build again several times to complete the build process.

Notice that you should simply delete include directives to PFC files which cannot be found: proper include directives will (normally) be inserted automatically.

Many projects will only require:

  • Accept to remove all unexisting packages
  • Accept to add required packages
  • Delete all include directives for files that does not exist
  • Accept to add include directives

Manual updates

This section describes things that may need manual and semi-manual updates.

findall, trap and finally

The predicates findall/3, trap/3 and finally/2 have been deprecated.

findall/3 should be replaced by using list comprehension:

findall(X, B, L) ==> L = [ X || B ]

trap/3 and finally/2 should be replaced by the try construct:

trap(P, E, H) ==> try P catch E do H end try
finally(P, F) ==> try P finally F end try

In all three cases the IDE will provide a "Fix" button in the error window than can make the rewrite, notice however that it may be necessary to make these in the opposite direction (last error first) to avoid that one fix will make the next fail.

Must unity

Must unify "==" can no longer be used on terms that will always unify, you should use "=" instead.

See also