Visual Prolog Technical Support
Known Problems in Visual Prolog 5.0
We are currently aware of the following problems in Visual Prolog 5.0, build 541!
Note please that a lot of problems have been solved in Visual Prolog 5.01, 5.02, 5.1. You can order a
new Visual Prolog 5.1 CD now.
Known Compiler Problems
Procedure checking
- We are still missing one analysis function to be used while checking procedure
predicates. We are unable to check that there must be one non-failing clause for each
possible combination of the input parameters.
Ex. it will cause a problem when append is used in the (i,i,o) procedure version like:
PREDICATES
append(list,list,list) - procedure(i,i,o)
CLAUSES
append([],L,L).
append([H|L1],L2,[H|L3]):-
append(L1,L2,L3).
It is easy to see that this predicate will not fail, because there is no matching on
the second parameter, and for the first parameter, there is a clause that will match for
both the empty list and the nonempty list!
The Visual Prolog compiler can still not detect this, but will give a warning for a
possible failure!
- It is not yet recognized that trap(procedure,_,erroneous) can not fail.
Last call optimization does not work for functions and Class methods
Please be aware of this. It is going to be implemented in one of the following
versions.
Problem with retract
We just found a special situation with retract which is not handled properly. If you
have a predicate, that makes a nondeterm call to retract, and then calls the same
predicate recursively, it will retract too much! Ex.:
clear_fact([First|Tail]):-
retract(a(First)), % <-- Use a cut here to avoid the Bug
clear_fact(Tail),
fail.
clear_fact(_).
Known Problems in the PROLOG.LIB
The Visual Prolog external database has different formats in 16 and 32 bit
This is inconvenient and will be changed in a future version. One of the results is
that the 16bit VDE uses one .VPR file for a project and the 32bit VDE uses another format.
The program VIPCONVERT must be used to switch between the platforms.
Problems trapping exceptions in the DLL's.
If a GPF or other exception happens in a prolog .DLL, which is called from a Prolog
main program, and linked-in statically, this exception is trapped in the main program (but
not as expected in the .DLL). After this exception is trapped wrongly you should not make
further calls to the .DLL, but instead close down your application.
There are no problems when calling a .DLL dynamically, and in properly debugged
programs this situation will not happen.
Invalid float exceptions handling under OS/2 & Win32
If the FPU raised a float exception, our handler catches it and passes the control to
RUN_Error(). However, the FPU remains in the erroneous state, so other calls to it
will fail. Under OS/2 there can be the 2nd float exception in DOSCALLS.DLL,
when our handler returns the control to the operating system, because OS/2 tries to
restore invalid FPUs context.
These problems are not seen in normal floating point operations!
Known Problems in the VDE
Spaces in filenames when using C as main target
The VDE, the linker and the compiler have problems with using external C compilers and
linkers placed in directories, which contain spaces.
The Visual Prolog does understand quoted filenames like "c:\program
files\msvc\bin\link.exe" but the problem is that the PATH to the C compiler is set in
one place, and the utility names in other places. This gives problems in the concatenating
of the two items.
Things work if you manually modify the scripts.
A little trick you might use, if you have some tools installed under PROGRAM FILES\, is
that you instead refer to the name "PROGRA~1".
Conversion of HAM to 5.0 format is irreversible
After conversion of .HAM file to the 5.0 format, it is not possible to go back As soon
as VIPCONV has converted a .HAM file to the new 5.0 format, it can not be converted back
to the 4.0 format.
Possible BUG when Dialog Expert Pack is updating source
When using the dialog pack, there is a significant delay while the source file is being
updated. If during this time, you hit 'edit' to edit the file, then the source update is
wrong. The code that was being added is at the beginning of the file.
Problem with non-existent Project on Command Line
When VIP.EXE (both 16- and 32- bit) is started with a non-existing .VPR file on
the command line, it does not report an error instead it loads the last loaded project.
Application Expert dialog uses accelerator keys that conflict with other sheets in
same dialog
It can lead to unexpected behaviors, so have this in mind if you use the accelerator
keys.
Using Ctrl-X, Ctrl-C or Ctrl-V in Menu Editor
Please note that there is the following dangerous behavior in the menu editor: If you
are editing the Constant prefix then Ctrl-X, Ctrl-C or Ctrl-V do not work there. You
should use the right-mouse popup menu.
Using multiprogrammer mode
- TheCode Expert setting for Automatic update of Source code of a resource is not saved,
when there is no changes in the resource (dialog, menu etc.).
- The setting for generation of Help file is not properly saved in the .PRJ file, so the
setting needs to be set for each .VPR file in the project team.
Help Maker
The current version of the Visual Prolog does not allow importing the .RTF files
containing graphics. An attempt to import .RTF file with embedded objects causes the
necessity to restart Visual Prolog. Nevertheless, it does not mean you cannot import file
with graphics at all, because it is possible to replace embedded objects in the source
.RTF file with the references to image files.
Known Problems in the VPI
Modal Dialog with Invisible flag is visible
The e_control event: e_control(scroll(sc_thumbtrack,Pos)
The Pos variable is specified as an INTEGER, but it is in fact a SHORT. This is seen if
you set a scrollbar to Min=-1000, Max=+1000.
Easywin does not support C as main Target
Modeless dialog Tab problem.
Tab does not work for the modeless dialogs, which have modal dialog as a parent.
Known Problems with the Debugger
Visual Prolog 5.0 includes the very first version of the VIP debugger
The following problems are known in the first version of VIP debugger:
- The values of output variables are sometimes not displayed (the following string is
shown: "???")
- Sometimes a console application will terminate unexpectedly after F7/F8.
- There are problems sometimes when debugging programs using classes.
- When fail happens, the debugger immediately jumps to a continue point with no
visual indication of a fail.
- The content of the call stack is not always correct, there might be extra entries.
- Tracing into Procedure variables does not work with F7 or F8, it is needed to set a
breakpoint to catch execution.
- The debugger will catch all errorexits that happens in the program, we need a better
solution for this.
Note, please, that in Visual Prolog 5.1 the debugger has been greatly improved.
Known Problems under UNIX
Fact initialization does not work properly
Initialization for facts specified in the program doesn't work properly, it can cause
problems when retracting them. Please initialize the facts by doing assert.
Known Problems with the Linker
We only know about problems when you link in non-PDC non-PROLOG object modules or
libraries.
1. For Win32 only. There is the PDC Linker's bug in the implementation of indirect call
to an import function, if its address is situated in the data segment.
2. For Win32 only. PDC Linker generates the import library in the MS Library format.
Note, that MSC supports archive format for libraries, but not MS Library format. So, there
is a compatibility problem, if a DLL which was built by the PDC Linker is used from an
executables which where built by MSC. This problem can be solved with implicit imports
definitions placed in the DEF-file. Note also, that the PDC Linker implements the exports
by names, not by ordinals. So, it's recommended for a user to have the following symbol
definitions in his DEF-file:
NAME - but not _NAME@N or _NAME@N1 @N2
General suggestion: If using C modules or other libraries (created using MSC or BC)
then it is better to use this tool at main target.
3. The generated Executables are bigger than those linked with the previous SLR linker.
The reason is that the segments are suffixed with Zeros.
The .RTF parser bug in using colored fonts
If a colored phrase in an .RTF document is followed by a table (right after), this
table erroneously is colored also.
Workaround : add any uncolored char (single blank) just after the
colored phrase.
|