home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d07xx
/
d0764.lha
/
Gambit_Terp
/
gsi.man
< prev
next >
Wrap
Text File
|
1992-11-21
|
5KB
|
158 lines
GSI(1) USER COMMANDS GSI(1)
NAME
gsi - Gambit Scheme interpreter
SYNTAX
gsi [expression]...
DESCRIPTION
Gsi is a Scheme interpreter that can be used to develop and
debug Gambit Scheme programs. Gsi has the ability to dynam-
ically load .O files produced by the Gambit Scheme compiler
gsc. If expressions are passed as arguments to gsi, they
are evaluated in left to right order and the result is
printed on standard output. When no expressions appear on
the command line, a read-eval-print (REP) loop is entered
after having loaded the file ".init.scm" if it is present,
otherwise "~/.init.scm" if it is present.
READ EVAL PRINT LOOP INTERACTION
In general, Scheme expressions typed in a REP loop are
evaluated and the result printed out. When an evaluation
error occurs, a REP loop of a higher level is entered. An
end of file (^D) will cause the current REP loop to be
aborted and the previous REP loop will be resumed. As
opposed to most other Lisp systems, gsi combines the stan-
dard REP loop functions with those of the debugger. In a
sense, you are always in debugging mode. You can at all
times examine the frames in the REP loop's continuation.
This is useful to determine what part of the program sig-
naled the error. Also, an expression typed in to the REP
loop will be evaluated in the context of the frame currently
being examined. Special commands accepted in a REP loop
are:
,q Terminate gsi abruptly.
,t Return to outer most (oldest) REP loop.
,d Return to previous REP loop. Same as ^D.
,r expr
Return from REP loop with the value of expr. This can
also be used to resume a computation that was inter-
rupted by the user (in this case expr can be any
value).
,? Give summary of commands.
,+ or ,-
Move to next or previous frame of the continuation.
,<n> Move to particular frame of the continuation. Frames
are numbered with non-positive integers. Frame 0 is
Amiga Release 2.04 Last change: local 1
GSI(1) USER COMMANDS GSI(1)
the most recent. Frame -1 is the next to most recent
and so on. When it is different from 0, the frame
number appears in the prompt after the REP loop level.
,b Display a summary of each frame in the continuation
starting with the current frame. There are 3 columns.
The first is the frame number. The second is the pro-
cedure that created the frame (and where control will
return when control returns to this frame). The last
column, if it is present, is the expression whose value
is being computed. A frame created by a compiled pro-
cedure has a third column only if the procedure was
compiled with the DEBUG option.
,l List all non-global variables accessible from this
frame.
,p Pretty print the procedure that created the current
frame.
NOTE
At any moment, execution can be interrupted by typing the
interrupt character (usually ^C). A program linked (by glk)
with the full runtime library can call up a REP loop by
evaluating `(##read-eval-print)'.
OPTIONS
The global variable `##argv' is bound to a vector of the
arguments passed to the program. The following options are
accepted by the program.
-s stack size Override the default stack size.
-c constant space size
Override the default constant space size.
-h heap size Override the default heap size.
-d level Generate a trace of the steps performed
when files are loaded. A level of 1 gives
a summary of the steps while a level of 2
gives a full trace. If not specified,
level defaults to 1.
-v variable Prints out the value of the variable
before starting the execution. This is
mainly used to print the address of primi-
tives when debugging.
-p Generate a timing profile graph for every
procedure bound to a global variable. The
graph will be generated in the file
prog.stats.
DIAGNOSTICS
The diagnostic messages produced by gsi are printed on the
standard output file.
Amiga Release 2.04 Last change: local 2