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 >
Text File  |  1992-11-21  |  5KB  |  158 lines

  1.  
  2.  
  3.  
  4. GSI(1)                    USER COMMANDS                    GSI(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      gsi - Gambit Scheme interpreter
  10.  
  11. SYNTAX
  12.      gsi [expression]...
  13.  
  14. DESCRIPTION
  15.      Gsi is a Scheme interpreter that can be used to develop  and
  16.      debug Gambit Scheme programs.  Gsi has the ability to dynam-
  17.      ically load .O files produced by the Gambit Scheme  compiler
  18.      gsc.   If  expressions  are passed as arguments to gsi, they
  19.      are evaluated in left to  right  order  and  the  result  is
  20.      printed  on  standard output.  When no expressions appear on
  21.      the command line, a read-eval-print (REP)  loop  is  entered
  22.      after  having  loaded the file ".init.scm" if it is present,
  23.      otherwise "~/.init.scm" if it is present.
  24.  
  25. READ EVAL PRINT LOOP INTERACTION
  26.      In general, Scheme expressions  typed  in  a  REP  loop  are
  27.      evaluated  and  the  result printed out.  When an evaluation
  28.      error occurs, a REP loop of a higher level is  entered.   An
  29.      end  of  file  (^D)  will  cause  the current REP loop to be
  30.      aborted and the previous  REP  loop  will  be  resumed.   As
  31.      opposed  to  most other Lisp systems, gsi combines the stan-
  32.      dard REP loop functions with those of the  debugger.   In  a
  33.      sense,  you  are  always  in debugging mode.  You can at all
  34.      times examine the frames in  the  REP  loop's  continuation.
  35.      This  is  useful  to determine what part of the program sig-
  36.      naled the error.  Also, an expression typed in  to  the  REP
  37.      loop will be evaluated in the context of the frame currently
  38.      being examined.  Special commands accepted  in  a  REP  loop
  39.      are:
  40.  
  41.      ,q   Terminate gsi abruptly.
  42.  
  43.      ,t   Return to outer most (oldest) REP loop.
  44.  
  45.      ,d   Return to previous REP loop.  Same as ^D.
  46.  
  47.      ,r expr
  48.           Return from REP loop with the value of expr.  This  can
  49.           also  be  used  to resume a computation that was inter-
  50.           rupted by the user  (in  this  case  expr  can  be  any
  51.           value).
  52.  
  53.      ,?   Give summary of commands.
  54.  
  55.      ,+ or ,-
  56.           Move to next or previous frame of the continuation.
  57.  
  58.      ,<n> Move to particular frame of the  continuation.   Frames
  59.           are  numbered  with  non-positive integers.  Frame 0 is
  60.  
  61.  
  62.  
  63. Amiga Release 2.04        Last change: local                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. GSI(1)                    USER COMMANDS                    GSI(1)
  71.  
  72.  
  73.  
  74.           the most recent.  Frame -1 is the next to  most  recent
  75.           and  so  on.   When  it  is different from 0, the frame
  76.           number appears in the prompt after the REP loop level.
  77.  
  78.      ,b   Display a summary of each  frame  in  the  continuation
  79.           starting  with the current frame.  There are 3 columns.
  80.           The first is the frame number.  The second is the  pro-
  81.           cedure  that  created the frame (and where control will
  82.           return when control returns to this frame).   The  last
  83.           column, if it is present, is the expression whose value
  84.           is being computed.  A frame created by a compiled  pro-
  85.           cedure  has  a  third  column only if the procedure was
  86.           compiled with the DEBUG option.
  87.  
  88.      ,l   List all  non-global  variables  accessible  from  this
  89.           frame.
  90.  
  91.      ,p   Pretty print the procedure  that  created  the  current
  92.           frame.
  93.  
  94. NOTE
  95.      At any moment, execution can be interrupted  by  typing  the
  96.      interrupt character (usually ^C).  A program linked (by glk)
  97.      with the full runtime library can call  up  a  REP  loop  by
  98.      evaluating `(##read-eval-print)'.
  99.  
  100. OPTIONS
  101.      The global variable `##argv' is bound to  a  vector  of  the
  102.      arguments  passed to the program.  The following options are
  103.      accepted by the program.
  104.  
  105.      -s  stack size    Override the default stack size.
  106.  
  107.      -c  constant space size
  108.                        Override the default constant space size.
  109.  
  110.      -h  heap size     Override the default heap size.
  111.  
  112.      -d  level         Generate a trace of  the  steps  performed
  113.                        when files are loaded.  A level of 1 gives
  114.                        a summary of the steps while a level of  2
  115.                        gives  a  full  trace.   If not specified,
  116.                        level defaults to 1.
  117.  
  118.      -v  variable      Prints  out  the  value  of  the  variable
  119.                        before  starting  the  execution.  This is
  120.                        mainly used to print the address of primi-
  121.                        tives when debugging.
  122.  
  123.      -p                Generate a timing profile graph for  every
  124.                        procedure bound to a global variable.  The
  125.                        graph  will  be  generated  in  the   file
  126.                        prog.stats.
  127.  
  128. DIAGNOSTICS
  129.      The diagnostic messages produced by gsi are printed  on  the
  130.      standard output file.
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154. Amiga Release 2.04        Last change: local                       2
  155.  
  156.  
  157.  
  158.