PROLOG-REQUEST@SUSHI.STANFORD.EDU (Chuck Restivo, The Moderator) (09/22/87)
PROLOG Digest Wednesday, 23 Sep 1987 Volume 5 : Issue 63
Today's Topics:
LP Library - ld_lib & list_sym.pro & read.me
----------------------------------------------------------------------
Date: Sun, 13 Sep 87 22:39:41 PDT
From: Edouard Lagache <lagache@violet.Berkeley.EDU>
Subject: ld_lib
/* FILE: LD_LIB */
/* * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Supplementary Predicate Libraries Loader File */
/* */
/* This file sets up the A.D.A. PROLOG */
/* Directory system to store all the predicates */
/* in the Supplementary Predicates Libraries in */
/* the directory 'system'. */
/* */
/* Edouard Lagache, Version - 1.1, July - 87 */
/* */
/* Note: This loader file works only with ADA */
/* PROLOG. Also it cannot be consulted */
/* like regular PROLOG source files. */
/* Instead it must be given as a */
/* line argument like this: */
/* */
/* PROLOG LD_LIB */
/* */
/* Finally, you may wish do adapt this */
/* loader file to include other files */
/* than the ones listed here. */
/* * * * * * * * * * * * * * * * * * * * * * * * */
/* Batch processing command mode */
batch.
/* Display an opening prompt to reassure user during process */
nlf(user). nlf(user).
prtstrf(user, " Installing Predicate Libraries").
nlf(user).
prtstrf(user, " 'ld_lib', E. Lagache, 7/87").
nlf(user). nlf(user).
chdom [root,system]. /* move to system directory */
/* Consult library files */
prtstrf(user, "consulting library 'ansi_io.pro'").
conscl('ansi_io'). nlf(user).
prtstrf(user, "consulting library 'env_funt.pro'").
conscl('env_funt'). nlf(user).
prtstrf(user, "consulting library 'stddef.pro'").
conscl('stddef'). nlf(user).
prtstrf(user, "consulting library 'stdlist.pro'").
conscl('stdlist'). nlf(user).
prtstrf(user, "consulting library 'window.pro'").
conscl('window.pro'). nlf(user).
/* Export symbols and return to 'user' directory */
nlf(user). prtstrf(user, "Setting directories").
export [ assoc, append, blink, black, blue, center_stg, comp_tabs,
clear_end, clear_line, clear_screen, cyan, call, countmatch,
current_count, collect_found, current_index_num, current_sum,
change_window, close_window, dos, delete, evenp, error,
end_window, findall, found, found_item, flatten, green, getnext,
gensym, get_next_num, get_head, get_index, get_tail, interval,
int_get_index, int_rev, locate_cursor, listp, last, list_sym,
magenta, max, min, make_assoc_list, merge, make_window, nthcdr,
nthelem, oddp, ptrstg, push_up, printall, quicksort, quisort1,
quisort2, reset, reverse, red, set_attribute, stringp, sum_match,
split1, split2, shift_l, shift_r, subst, sumlist, start_window,
store_symbols, underline, update_countmatch, update_sum_match,
white, yellow].
chdom [root,user].
import [ assoc, append, blink, black, blue, center_stg, comp_tabs,
clear_end, clear_line, clear_screen, cyan, call, countmatch,
current_count, collect_found, current_index_num, current_sum,
change_window, close_window, dos, delete, evenp, error,
end_window, findall, found, found_item, flatten, green, getnext,
gensym, get_next_num, get_head, get_index, get_tail, interval,
int_get_index, int_rev, locate_cursor, listp, last, list_sym,
magenta, max, min, make_assoc_list, merge, make_window, nthcdr,
nthelem, oddp, ptrstg, push_up, printall, quicksort, quisort1,
quisort2, reset, reverse, red, set_attribute, stringp, sum_match,
split1, split2, shift_l, shift_r, subst, sumlist, start_window,
store_symbols, underline, update_countmatch, update_sum_match,
white, yellow].
nlf(user). nlf(user).
nobatch.
see(user).
------------------------------
Date: Sun, 13 Sep 87 22:40:23 PDT
From: Edouard Lagache <lagache@violet.Berkeley.EDU>
Subject: list_sym.pro
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* A.D.A. VML PROLOG symbol listing utility */
/* */
/* 'store_symbols' stores the names of all symbols in the */
/* into a user specified file. This is useful for setting up lists */
/* of symbols to be exported from the A.D.A. symbol directory */
/* system, or in preparing documentation to support an appilcation. */
/* */
/* Edouard Lagache, Version - 1.10, July - 1987 */
/* */
/* Note: This predicate depends on A.D.A. specific predicates and */
/* will not function on other systems. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 'store_symbols' sets up the file access for 'printall' */
store_symbols(File) :- open(File,w),printall(File),close(File).
/* 'printall' uses the 'object' predicate to list out all the names */
/* in the current directory. The technique used is */
/* similar in spirit to 'findall'. */
printall(File) :- object(X,symbol),printf(File,X),
prtstrf(File,", "),nlf(File), fail.
printall(_) :- !.
------------------------------
Date: Sun, 13 Sep 87 22:41:28 PDT
From: Edouard Lagache <lagache@violet.Berkeley.EDU>
Subject: READ.ME
September 4, 1987
PROLOG Supplemental Predicate Libraries
Edouard Lagache
Copyright (C) 1987, ALL RIGHTS RESERVED
Release - I, July - 1987
A B S T R A C T
This is a set of libraries of PROLOG predicates
that can be useful in a wide range of applications.
This set includes the following libraries: ANSI standard
terminal manipulation, PROLOG environment functions,
arithmetic and matching functions, generic input/output
functions, list manipulation functions, and window
device support.
SPECIAL NOTES AND ERRATA:
An early release to Automata Design Associates contained
two minor bugs: the call to 'prtstr' in the
'center_stg' predicate was misspelled, and an a number
of extraneous symbols were exported in the 'LD_LIB'
loader file. Both bugs have been fixed and the
documentation, and source code are believed to be
correct.
However, users should be warned that A.D.A. PROLOG
may suffer from interference from memory resident
programs. Such interference has caused A.D.A. VML
PROLOG to lock up while attempting to load up a
file, after having loaded up this library with
'LD_LIB'. Not using the directory scheme does not
always cure the problem. Users having this sort of
problem are advised to first try removing memory
resident programs before attempting other fixes.
NOTES ON PRINTING THE DOCUMENTATION:
The documentation should print on any standard line
printer. Continuous feed paper is recommended. The
documentation is approximately 46 pages.
------------------------------
End of PROLOG Digest
********************