home *** CD-ROM | disk | FTP | other *** search
-
- WELCOME TO PDC PROLOG VERSION 3.2
- ----------------------------------
-
- This README file contains necessary information about PDC
- Prolog Version 3.2 that is not included in the documentation at
- this time. Please read this file in its entirety and refer to
- it if you have any questions.
-
- TABLE OF CONTENTS
- -----------------
- 1. How to contact technical support
- 2. Installing PDC Prolog 3.2
- 3. Mistakes/additions to the manual
- 4. System limits
-
-
- 1. HOW TO CONTACT TECHNICAL SUPPORT
- ------------------------------------
- If you have any problems, please read this file and the PDC
- Prolog manuals first. If you still have a question and need
- assistance, help is available from the following sources provided
- you are a registered user (to register, simply send in the User
- Registration Card enclosed, or complete the "regcard" file enclosed
- and send it through E-Mail):
-
- 1. Check with your local software dealer or users' group.
-
- 2. Type GO PCVENB on the CompuServe bulletin board system
- and access the messages/libraries as appropriate. You may
- also send mail to the PDC from there (see the sysop
- roster for correct ID).
-
- 3. Send your message through MCI MAIL to
-
- PDC-Atlanta (for North America)
- PDC-Copenhagen (for outside North America).
-
- 4. Write to us at the following address:
-
- In North America:
- Prolog Development Center
- 568 14th Street N.W.
- Atlanta, GA 30318.
-
- Outside North America
- Prolog Development Center,
- H.J. Holstvej 5A,
- DK - 2605 Brondby, Copenhagen,
- Denmark.
-
- 5. If you have an urgent problem that can't wait and you are a
- registered user, you may call the PDC at
-
- +1 (404) 873-1366 (PDC in Atlanta, for North America)
- +45 36 72 10 22 (PDC in Copenhagen, for outside North America).
-
- Please have the following information ready before calling:
-
- a. Serial number on your original distribution disk.
- Please have your serial number ready or we will be unable
- to process your call.
-
- b. Product version number. The version number is printed on
- the distribution disks.
-
- c. Computer brand and model, and the brands and model numbers
- of any additional hardware.
-
- d. Operating system and version number. (The version number
- can be determined by typing VER at the OS prompt.)
-
- e. Contents of your AUTOEXEC.BAT file.
-
- f. Contents of your CONFIG.SYS file.
-
- Not all of the above may be required, but it may help us to
- identify the origin of your problem. However, please note that
- it will frequently prove impossible to diagnose a problem on the
- telephone, for which reason written (mail or E-mail) communication
- is the preferred method.
-
- In any case, before contacting us, please try to isolate the problem
- and if possible try to see if the problem persists if the machine's
- configuration is changed or if the program is moved to another machine.
-
-
-
- 2. INSTALLING PDC PROLOG 3.2
- ------------------------------
-
- Simply run the "install" program. This runs in both real mode (DOS) and
- protected mode (OS/2). You will then be prompted for the name of the directory
- in which to install the PDC Prolog system; if requested, the installation
- program will create the directory for you. From there on, follow the prompts
- to install the parts of the system and example programs you want. The
- installation program tells you how much disk space is needed for each
- component.
-
- If you install everything, you will end up with the following directory
- setup (assuming you specified installation in a directory named c:\psys):
-
- c:\psys\ Main directory, containing compiler(s),
- libraries(s) and associated files.
- c:\psys\include\ Header files, defining compile-time constants.
- c:\psys\foreign\tc\ Turbo C interface.
- c:\psys\foreign\msc\ Microsoft C interface.
- c:\psys\foreign\msc2\ Microsoft C interface for OS/2 (OS/2 only).
- c:\psys\bgi\ BGI drivers and library.
- c:\psys\programs\ Various demonstration programs.
- c:\psys\programs\pie\ Prolog Inference Engine (C&M in PDC Prolog)
- c:\psys\programs\pipes\ Message pipes (OS/2 only).
- c:\psys\programs\register\ External database system.
- c:\psys\answers\ Answers to exercises.
- c:\psys\examples\ Examples from the User's Guide.
- c:\psys\refexamp\ Examples from the Reference Guide.
-
-
- SPECIAL NOTE FOR THE OS/2 VERSION:
-
- As PDC Prolog includes standard predicates directly accessing hardware
- ports, the OS/2 version requires Input/Output privileges. If you
- get the message
-
- SYS0197: Microsoft Operating System/2 is not presently
- configured to run this application.
-
- when you start the Prolog system, it means your OS/2 is not configured to
- allow this. In that case, add a line of the form
-
- IOPL=YES
-
- to the "config.sys" file in the root of drive C and reboot the system.
-
- The OS/2 linker is executed as a child process by the PDC Prolog system
- when you compile to an executable file, and the Prolog system automatically
- supplies it with the linker definition file called "link2.def" from the
- Prolog system's home directory. However, if you create a program
- containing calls to the "port_byte" standard predicate, you need to tell
- the linker that parts of the program require IOPL. In this case, replace
- the contents of "link2.def" with the contents of "linkiopl.def", also found
- in the Prolog system's home directory.
-
-
- 3. CHANGES, CORRECTIONS AND ADDITIONS TO THE MANUALS
- -----------------------------------------------------
-
- The default keyboard setup is PROLOG.CFG, which by and large is compatible
- with Turbo Prolog 2.0. However, we have provided two other setups--
- MULTMATE.CFG, which is compatible with MultiMate, and SPRINT.CFG,
- which is compatible with Sprint. Feel free to use whichever you like,
- but note that the Sprint setup is by far the most consistent and coherent.
- Therefore, it's recommended that new users (and also users of previous
- versions, for that matter) use this one rather than either of the other two.
- Regrettably, the BRIEF-compatible setup mentioned in the manual could not
- be realized in this version.
-
- ----------
-
- stlnremove as described in the User's Guide is not implemented in the
- system. Predicates like "edit" will instead remove the status line themselves.
-
- Be aware that status lines are now turned on by default in an .EXE, but
- this can be turned off with the "stlnstatus/1" predicate.
-
- ----------
-
- The appendix on changes from previous versions does not mention the C
- interface. Compilation should now be done with underbars on, and
- linking is rather different. You should see the separate chapter on
- foreign language interface as well as the FOREIGN subdirectory
- distributed with the system. However, please note that an extra parameter
- (not described in the manual) is required on the DOS versions of
- the main initialization function. See the files 'tcmain.c' and/or
- 'mscmain.c' in the foreign\tc and foreign\msc subdirectories, respectively.
-
- ----------
-
- If there are duplicates in a B+ tree, key_search(i,i,i,i) (i.e., where both
- the key and the ref are input arguments) will find an arbitrary match
- (though note that in this case duplicates means same key AND same ref),
- while key_search(i,i,i,o) will find the first match.
-
- ----------
-
- The first application key in the Integrated Environment is defined as
- Paste prototype (Ctrl-F1 in PROLOG.CFG).
-
- ----------
-
- Edit paste buffer is implemented for the editor. The assigned key can
- be inspected under the "Miscellaneous" entry in the editor popup menu.
-
- ----------
-
- Searching (in the editor) is now case-insensitive.
-
- ----------
-
- A new standard predicate, "setfilesize(File)" (not documented in the manual),
- allows explicit truncation or expansion of an open file, by setting its
- physical allocation to the current position of the file pointer. It has
- two posiible run-time errors (in addition to errors originating from the
- OS):
-
- 1103 Attempt to assign output device to a file that is not in writemode.
- 1104 The file isn't open.
-
- ----------
-
- Note that when executing in a text-moded Presentation Manager window in OS/2,
- Ctrl-Break has no effect; use Ctrl-C instead. This problem stems from PM,
- not the Prolog system.
-
- Also note that, if executing the DOS version in the DOS box in OS/2,
- Ctrl-Break may hang the entire machine and you may be unable to switch
- back to OS/2. Workaround: If you're running OS/2, use the OS/2 version.
-
- ----------
-
- It may be a bit confusing that the keyboard setup menu has entries for
- "Save file", "Load file" and "Pick file" in two different submenus.
- The reason is that these keys appear both in the "Files" pull-down menu
- and as global hot keys working everywhere in the integrated environment.
- In generated .EXE files only the "Files" menu is present.
-
- ----------
-
- The Files/New menu choice will not ask for a new file name,
- but instead start with an empty text.
-
- ----------
-
- The "GOTO LINE" and "GOTO POSITION" editor functions allow the numbers
- to be terminated by a normal carriage return.
-
- ----------
-
- Error messages for "readdevice" in the Reference Guide should be:
- 1102 Attempt to assign input device to a file that is not in readmode.
- 1104 The file isn't open.
-
- ----------
-
- Error messages for "writedevice" in the Reference Guide should be:
- 1103 Attempt to assign output device to a file that is not in writemode.
- 1104 The file isn't open.
-
- ----------
-
- The manual incorrectly states that the predicate "existfile" will give a
- run-time error if the file name includes a nonexistent path. This is not the
- case; existfile will fail if either the file itself or the path doesn't exist.
-
- ----------
-
- Flushing a printer will always close and reopen it. This is in
- order to force a true flush when printer output is spooled, either locally
- or through a network. On the other hand, closing or opening the standard
- printer ("LPT1" or "PRN", handle 4) currently has no effect in DOS.
-
- In this connection, it should be observed that users of previous versions
- who have used a hack to get at the real file handle for Prolog files are
- in for a surprise. Although the same code will work, flushing a file on
- DOS versions less than 3.30 causes the file to be closed and reopened
- in the same position. There is, therefore, no guarantee that the file handle
- for a particular Prolog file remains the same after a call to the "flush"
- standard predicate.
-
- ----------
-
- The manual incorrectly states that this file contains information regarding
- extended screen text modes selectable from the integrated environment.
- However, all relevant information is found in the Reference Guide.
-
- ----------
-
- The procedure described in the manual for generating a Microsoft-compatible
- Prolog library is not needed any more. Both DOS and OS/2 Prolog libraries are
- compatible with both TLINK and LINK.
-
- ----------
-
- The manual incorrectly states that the standard predicate "osversion" strips
- leading and trailing zeroes. This is not the case; the operating system
- version returned by the OS is converted AS IS to a string representation.
-
- ----------
-
- For command-line compilation there is a link-only option implemented as:
- prolog -cl FileName
-
- ----------
-
- The biggest database number you can use in the predicate "str_ref" is ~3FFFFFF.
- Otherwise the predicate will complain about an invalid value.
-
- ----------
-
- If you use Microsoft C you have to use the BYTE alignment option (-Zp1).
- Please see the example under FOREIGN\MSC.
-
- ----------
-
- As opposed to the previous versions, the dialog window uses the editor rather
- than a fancy line-input routine, and you should use PASTE to recall the
- previous goal. You can also use the cursor keys to go back and re-enter
- previous goals. You should note that the editor is entered in word-wrapping
- mode.
-
- ----------
-
- New predicates for handling the cursor are:
-
- cursorsync:
- Following "foreign" update of the cursor (e.g., when redirecting output
- to stdout), the Prolog system has no way of knowing that the cursor
- has moved, and will hence write new prompts, etc., in the wrong place.
- Calling cursorsync will synchronize the Prolog system's cursor to
- wherever the cursor is on screen, but, if the new position is outside
- the current window, it will be forced inside.
-
- cursorstate(on/off):
- Normally the Prolog System turns the cursor on and off automatically,
- whenever needed. However, calling cursorstate(off) turns the cursor
- permanently off, and it remains under manual control until
- cursorstate(on) is called, putting the cursor control back into
- "automatic" mode. Note that you assume all responsibility for
- displaying the cursor at the correct time if you turn it off.
- cursorstate(on) may be called at any time, also without being
- preceded by a call to cursorstate(off). In that case, it has the effect
- of synchronizing the OS cursor with Prolog's cursor.
- ----------
-
- In addition to the "edit/16" standard predicate, there is a new "edit/20"
- predicate (not described in the manual) where the extra parameters after
- those applying to edit/16 are:
-
- integer EscOnCr % 1 means carriage return will terminate editor
- integer FileOperations % 0 means the file menu operations will be inactive
- string Help % Allows extra information to be popped up
- string StatLine % Status line
-
- ----------
-
- There is a new standard predicate to set the text in the editor application
- key menu, called "applicationkey(KeyNo,String)", where KeyNo >= 1 and KeyNo <= 8
- and the length of the string <= 20.
-
- ----------
-
- There are special programming errors that can cause Prolog programs to
- crash the computer under DOS and cause a protection violation under OS/2.
- These are:
-
- - Mixing up the global declarations in a project.
- - Using different domains for storing and retrieving terms for the
- external database or in the OS/2 message system.
- - Referring to invalid database reference numbers.
- - Accessing nonexistent memory in memword, membyte and ptr_dword.
-
- If you experience a problem, you should make sure you haven't fallen foul
- of any of these, or the final one:
-
- Do not use term_delete on the ref following a ref returned by chain_terms.
- chain_terms is nondeterministic, and doing so will invalidate the entry
- chain_terms would return when backtracked into. The result is a run-time
- error or, at worst, a protection violation in OS/2.
-
- ----------
-
- Finally, see the NEWS.PRO example in the programs subdirectory for a quick
- demonstration of many of the new features.
-
-
-
- 4. SYSTEM LIMITS
- -------------------
- The limits shown apply to both DOS and OS/2, unless otherwise indicated.
-
-
- Compilation:
-
- Domains in a single source module (including database domains) : 228
-
- Alternatives in a domain declaration: 250
-
- Subgoals in a clause: 100 (OS/2: 250)
-
- Clauses in a predicate 400 (OS/2: 1,000)
-
- Database predicates in a database section: 250
-
- Local variables, including arguments, in a clause: 250
-
- Arguments to a predicate or domain alternative: 50
-
- Length of identifiers: 250
-
- Length of constant strings in source code: 250
-
- Left-hand alternatives in a domain declaration: 20
-
- Total number of include files: 50
-
- Nesting of conditional compilation: 25
-
- Predicates in a single source module, incl. all flow variants: 674 (OS/2: 2,735)
-
-
- At run-time there are many different limits, often dependent upon system
- resources, which may vary from time to time. The most important are outlined
- below.
-
- Windows: 50 (OS/2: 100)
-
- Files: OS limit / domain alternatives(250).
-
- unreadchar (internal kbd buffer): 127
-
- readln (length of input line in kbd mode): 250
-
- Memory
- DOS: available memory.
- OS/2: available memory / swap space,
- with the additional limits of
- GStack: No more than 2,000 segments (the size of each may vary)
- Heap : No more than 2,000 segments (each with gross size 64K,
- suballocated as far as possible)
- Trail : 64K
- Stack : 64K